ObjectDB Database Search
151-200 of 200 resultsInsert a new entity class in a class hierarchy does not work Hello, we have an entity class hierarchy and we want to insert a new entity in this hierarchy ... , because the class hierarchy had already always existed and the "new" entity class needed ... would be also inserted new in the class hierarchy then it works well. See our example in the attachments. Execute | |
ObjectDB Object Database Features). Up to 2,147,483,648 entity classes per database file. Up to 2,147,483,648 indices per database file ... versioning. Class hierarchy changes are handled automatically. New added fields are handled ... . Moving fields up and down in the class hierarchy is transparent. Support for renaming types, fields | |
Literals in JPQL and Criteria Queries literals represent entity types in JPQL, similar to how java.lang. Class instances represent Java ... literal is the name of the entity class (for example, Country ). This is equivalent to Country. class in Java code. The name of the entity class is not enclosed in quotation marks because type literals | |
Auto Generated Values with @GeneratedValue and use the AUTO strategy: @Entity public class EntityWithAutoId1 { @Id @GeneratedValue ... definition is equivalent: @Entity public class EntityWithAutoId2 { @Id @GeneratedValue long id ... is very similar to the AUTO strategy: @Entity public class EntityWithIdentityId { @Id @GeneratedValue | |
Date and Time in JPQL and Criteria Queries expressions that extract date parts: Expression year = cb. function ("year", Integer. class , date); Expression month = cb. function ("month", Integer. class , date); Expression day = cb. function ("day", Integer. class , ts); // Create expressions that extract time parts: Expression hour = cb. function ("hour | |
JPA Query Structure (JPQL / Criteria) operates on Java classes and objects. For example, a JPQL query can retrieve entities, unlike SQL ... ). The exceptions, where JPQL is case-sensitive, include Java source elements such as the names of entity classes ... to an entity class is called a range variable. Range variables define an iteration over all the database | |
JPA Core Types engine and performing CRUD operations in ObjectDB. These interfaces and classes manage the entity ... illustrates the core JPA classes , interfaces, and enums, including their dependencies ... Initialize the persistence context and configure the engine using these classes : The primary bootstrap class | |
JPA Criteria API Queries: CriteriaBuilder cb = em. getCriteriaBuilder (); CriteriaQuery q = cb. createQuery (Country. class ); Root c = q. from (Country. class ); q. select (c); The CriteriaBuilder interface is the main factory ... can be executed more concisely: TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country. class | |
Database Management Settings is defined in the entity class . Some ORM JPA providers require a version field. You can disable ... index is defined for an existing entity class that already has instances stored in the database ... parameter . The elements To remove the ObjectDB evaluation restrictions (a limit of 10 entity classes | |
JPA Annotations, lifecycle events, and relationship structures across various architectural layers. Class level definitions Use class -level annotations to define persistent types and configure class -level behavior: Define classes as entities, embeddables, or mapped superclasses while configuring caching and listener | |
Updating JPA Entities, you can modify it in memory within an active transaction: Employee employee = em. find (Employee. class ... classes are enhanced. Therefore, for efficiency, ObjectDB by default ignores array changes when entity classes are enhanced: Employee employee = em. find (Employee. class , 1); em. getTransaction | |
JPA Listeners & Callbacks Annotations a listener class . Listeners configuration Entity Entities and mapped superclasses ... listener classes for the entity or mapped superclass. These listeners respond to lifecycle events ... unit are not applied to this class . Specifies that listeners declared in superclasses are not | |
WHERE clause (JPQL / Criteria API) that satisfy the WHERE predicate. For entity classes with millions of objects in the database ... as follows: CriteriaQuery q = cb. createQuery (Country. class ); Root c = q. from (Country. class ); q. select (c); ParameterExpression p = cb. parameter (Integer. class ); q. where (cb. gt (c | |
JPA Query API ("SELECT c FROM Country c", Country. class ); In the preceding code, the same JPQL query ... queries, consider a scenario where no Country instances exist in the database and the Country class is not yet known as a managed entity class . In this case, only the TypedQuery variant is valid | |
Deleting JPA Entities: Employee employee = em. find (Employee. class , 1); em. getTransaction (). begin (); em. remove (employee ... entities that the field references. @Entity class Employee { : @OneToOne ( cascade = CascadeType . REMOVE ... : @Entity class Employee { : @OneToOne ( orphanRemoval =true) private Address address; : } When an Employee | |
JPA Fetch Graphs Annotations on entity classes . These graphs optimize database performance by specifying which attributes ... named entity graphs at the class level using the following annotations: Specifies a named entity graph. It is defined on an entity class and contains a list of attribute nodes that constitute the fetch | |
jakarta.persistence.EntityManager. Since: Jakarta Persistence (JPA) 1.0 EntityGraph createEntityGraph ( Class rootType ) Create a new mutable EntityGraph , allowing dynamic definition of an entity graph. Parameters: rootType - class ... ) 1.0 TypedQuery createNamedQuery ( String name , Class resultClass ) Create an instance | |
Query Parameters in JPA", Country. class ); return query. setParameter ("name", name). getSingleResult (); } The WHERE clause ... = ?1", Country. class ); return query. setParameter (1, name). getSingleResult (); } The format ... ) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c.name = '" + name + "'", Country. class | |
JPA Connections and Transactions, which are used to execute database queries. Every JPA implementation provides classes that implement these interfaces. When you use ObjectDB, you work with instances of its implementation classes ... of the JPA bootstrap class , Persistence : EntityManagerFactory emf = Persistence | |
JPA Optimistic and Pessimistic Locking class . Pessimistic Locking The main supported pessimistic lock modes are: PESSIMISTIC_READ ... employee = em. find ( Employee. class , 1, LockModeType . PESSIMISTIC_WRITE ); Similarly, the refresh ... . find ( Employee. class , 1, LockModeType . PESSIMISTIC_WRITE , properties); ... em. refresh (employee | |
JPA Exceptions manage broad persistence issues by using the base class . The exception hierarchy is as follows ... General persistence exceptions The base class for general persistence failures is: This is the root runtime exception for the JPA API. All other JPA exceptions inherit from this class , enabling | |
jakarta.persistence.Convert specify the converter class , except to disambiguate cases where multiple converters ... instances contained in the map, or an entity class which extends a mapped superclass , to enable or ... a basic attribute @Converter public class BooleanToIntegerConverter implements AttributeConverter | |
JPA Named Queries Annotations Jakarta Persistence (JPA) provides annotations to define static, reusable queries at the class level, separating query logic from business code. Query definitions Declare named queries using ... . A container annotation that groups multiple @NamedQuery definitions on a single class . Supplies parameters | |
Detached JPA Entities, which can be a single entity or a collection of entities: @Entity class Employee { : @OneToOne ( cascade ... a collection of entities: @Entity class Employee { : @OneToOne ( cascade = CascadeType . MERGE ) private | |
Strings in JPQL and Criteria Queries to 6 . 'Poland'.toLowerCase() is evaluated to 'poland' . The matches method of the String class ... . parameter (String. class ); // str [NOT] LIKE pattern Predicate l1 = cb. like (path, param); Predicate | |
JPA Attributes Annotations of an embeddable class . Specifies the version field or property of an entity, which is used ... . An enumeration defining the SQL type mapping: DATE , TIME , or TIMESTAMP . For more details, see the Persistent Classes chapter in the ObjectDB manual. | |
What is the Java Persistence API (JPA)?) is that in JPA data is represented by classes and objects rather than by tables and records as in ... (as classes and objects). ObjectDB is the only database management system with built in support | |
DELETE Queries in JPA/JPQL all instances of a specified entity class , including instances of its subclasses, from the database ... + an optional variable ObjectDB supports using the java.lang.Object class in queries as an extension | |
SQL Queries Annotations dialect. Groups multiple @NamedNativeQuery definitions on a single class . Result set mapping Map ... entity class . Maps a specific SQL column to an entity field or property within an @EntityResult . Maps a result set column directly to a scalar value. | |
JPA Container Injection Annotations). A container annotation for declaring multiple @PersistenceContext definitions on a single class ... metadata. A container annotation for declaring multiple @PersistenceUnit definitions on a single class | |
Running JPA Queries Country c", Country. class ); List results = query. getResultList (); Both the Query and TypedQuery ... the database: TypedQuery query = em. createQuery ( "SELECT COUNT(c) FROM Country c", Long. class ); long | |
JPA Criteria Query Selection and Results ( CriteriaBuilder.array ), application defined result classes ( CriteriaBuilder.construct ), and tuples ... class ). For more information, see the SELECT in Criteria Queries section. ORDER BY clause elements | |
Comparison in JPQL and Criteria API values: Can be compared using the equality operators ( = , , == , != ). User-defined class instances (entities and embeddable classes ): Can be compared using the equality operators | |
JPA Relationships Annotations Relationships define associations between entities. They are represented In Java code by attributes (persistent fields or properties) in persistent classes that hold a reference or a collection ... in the target entity used as the map key for a Map-valued association. For more details, see the Persistent Classes chapter in the ObjectDB manual. | |
JPA ORM Mapping Annotations class hierarchy. An enumeration defining the strategies: SINGLE_TABLE , JOINED , or TABLE_PER_ CLASS | |
GROUP BY and HAVING clauses. createQuery (Country. class ); Root c = q. from (Country. class ); q. multiselect (c. get ("currency"), cb. sum | |
ORDER BY clause (JPQL / Criteria API) the criteria query API as follows: CriteriaQuery q = cb. createQuery (Country. class ); Root c = q. from (Country. class ); q. select (c); q. orderBy (cb. asc (c. get ("currency")), cb. desc (c | |
Managing JPA Entities Entities are in-memory instances of entity classes (persistable, user-defined classes ) that represent physical objects in the database. Managing an ObjectDB database with JPA requires using entities for many operations, including storing, retrieving, updating, and deleting database objects | |
jakarta.persistence.metamodel.EntityType of the managed type. Since: Jakarta Persistence (JPA) 1.0 Class getBindableJavaType () Return the Java ... CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued ... . Since: Jakarta Persistence (JPA) 1.0 CollectionAttribute getDeclaredCollection ( String name , Class | |
jakarta.persistence.metamodel.IdentifiableType CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued attribute ... Persistence (JPA) 1.0 CollectionAttribute getDeclaredCollection ( String name , Class elementType ) Return ... . Since: Jakarta Persistence (JPA) 1.0 SingularAttribute getDeclaredId ( Class type ) Return | |
jakarta.persistence.metamodel.MappedSuperclassType CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued ... Persistence (JPA) 1.0 CollectionAttribute getDeclaredCollection ( String name , Class elementType ... type. Since: Jakarta Persistence (JPA) 1.0 SingularAttribute getDeclaredId ( Class type ) Return | |
jakarta.persistence.criteria.CriteriaBuilder. Since: Jakarta Persistence (JPA) 1.0 CompoundSelection construct ( Class resultClass , Selection ... is for an entity class , the resulting entities will be in the new state after the query is executed. Parameters: selections - arguments to the constructor resultClass - class whose instance is to be constructed | |
jakarta.persistence.OneToOne: Annotation Target: Method, Field Specifies a single-valued association to another entity class ... class to specify a relationship from the embeddable class to an entity class . If the relationship is bidirectional and the entity containing the embeddable class is on the owning | |
Schema-Update: Deactivation of automatic entity class removing and introduction of a new class remove in the schema config works correctly we add ALL entity classes to this product. Because we will prevent a data loss of entites which are not found in the class path. With this background it would be very helpful for us if we could ignore in the ProfileMigration the classes we had not changed. And we were able | |
Step 1: Create a Java Project ). The name of the Main class should be tutorial.Main . Verify that exactly this case sensitive fully qualified class name is set (you may use copy & paste). Click the Finish button to create ... with ObjectDB/JPA support. The next step is creating a JPA Entity class . | |
Step 1: Create a Maven Web Project.2 enhance process- classes java com.objectdb.Enhancer guest.Guest org.mortbay.jetty maven-jetty ... Framework and ObjectDB/JPA support. The next step is creating a JPA Entity class . | |
Step 1: Create a Maven Web Project- classes java   ... MVC Framework and ObjectDB/JPA support. The next step is creating a JPA Entity class . | |
[ODB1] Chapter 5 - JDO Connections. Both PersistenceManagerFactory and PersistenceManager are defined as JDO interfaces, not as classes . Every JDO implementation, including ObjectDB, defines classes that implement these interfaces. When using ObjectDB you are actually working with instances of ObjectDB classes , but to make your application JDO | |
[ODB1] Chapter 1 - About ObjectDB with tables, records and SQL in addition to the application's classes and objects. ObjectDB is JDO ... . Most other JDO implementations map classes and objects to tables and records in an RDBMS. Using ... on the application's Java classes exclusively. ObjectDB is Very Portable ObjectDB is written entirely | |
ObjectDB 1.0 Manual on programming with ObjectDB and JDO: Chapter 3 - Persistent Classes Explains what a persistence capable class is and which types are supported by JDO. Chapter 4 - JDO Metadata Shows how to define JDO metadata for persistence capable classes . Chapter 5 - JDO Connections Shows how to use database connections |