ObjectDB Database Search

1-50 of 200 results

JPA Primary Key

Every entity object that is stored in the database has a primary key . Once assigned, the primary ... an object database, ObjectDB supports implicit object IDs, so an explicitly defined primary key is not required. But ObjectDB also supports explicit standard JPA primary keys , including composite primary

ObjectDB Object Database Features

support of the JPA and JDO APIs. Fundamental features of relational databases (e.g. primary keys ... callback methods and listener classes . JDO callback methods and listener classes. Primary Keys Support of primary keys in ObjectDB is unique compared to other Objec-Oriented Databases. Primary Key

2.7.3_03 Erroneous "Attempt to modify a primary key of a managed object"

a primary key of a managed object", but my application is not trying to change the primary key .  ... . Could you please provide details on the primary key of JdoBlob2 ? Is it composite? embedded ID ... in JDO to represent a combination of class + primary key and therefore it seems a bit strange to use

A bidirectional OneToOne association with a shared primary key

;bidirectional @OneToOne association that has a shared primary key , example: http://fruzenshtein.com/bidirectional-one-to-one- primary - key -association/ Can ObjectDB support this same specific relationship ... keys , i.e. the primary key will be stored at least on one side of the relationship

problem when primary key value is zero

and recommendations, in particular there are some primary keys with value == 0. These cause problems for objectDB, typically "JPA Unexpected argument as primary key ". When using eclipselink, there is a workaround ... Lister There is nothing wrong with 0 as a primary key value. For example the following code doesn't

More Efficient Primary Keys

Primary Key   with two Longs b) Embedded Primary Key with two Longs c) Furthermore, as String ... for the database engine. In both cases it is a composite primary key with the same size and structure. (b ... Can you give us a recommendation as we can represent the Key (UUID) most efficient? Both in terms

Failed to commit transaction: Attempt to reuse an existing primary key value (613)

.RollbackException Failed to commit transaction: Attempt to reuse an existing primary key value ... .EntityExistsException: com.objectdb.o.UserException: Attempt to reuse an existing primary key value ... with the same primary key . Unfortunately it is impossible to provide help based on this report

Intermittent: "Attempt to reuse an existing primary key value" when persisting a new instance

Hi,   I don't have a useful test case to expose this issue, but I am getting an intermittent "Attempt to reuse an existing primary key value". In this particular instance, the error is: Attempt to reuse an existing primary key value (com.x.y.z.UserPassword:1) (error 642) at com.objectdb.jpa

Merge failure with composite primary key

.3.7_21 should fix it. The composite primary key issue is unclear, since switching to a single primary key field doesn't seem to make any difference. support Support

Changing Primary Key

that, and query the table all the PK fields are null or 0.  What can I do to modify primary keys ?     Trianglehead Json Error ObjectDB doesn't support changing primary keys , as it may break

Primary key generation problem after changing entity package

to reuse an existing primary key value... My primary keys are annotated as shown below : @Id

Auto Generated Values

generated for that field. This is primarily intended for primary key fields but ObjectDB ... for entity objects with no primary key fields defined (as explained in the previous section ). The same number generator is also used to generate numeric values for  primary key fields annotated by

Retrieving JPA Entity Objects

of entity classes and to keep them as simple as possible. Retrieval by Class and Primary Key Every entity object can be uniquely identified and retrieved by the combination of its class and its primary key ... object whose primary key is 1: Employee employee = em. find (Employee.class, 1); Casting

Defining a JPA Entity Class

a primary key and what a version field is and how to use it. If you are already familiar with JPA you might have noticed that the Point entity class has no primary key ( @Id ) field. As an object database, ObjectDB supports implicit object IDs, so an explicitly defined primary key is not required

JPA Entity Fields

(Mapped By) fields Primary key (ID) fields Version field The first three groups (transient ... two groups ( primary key and version fields) can only be used in entity classes. Primary key fields are discussed in the Primary Key section. Transient Fields Transient entity fields are fields

Is ObjectDB better than competing object databases?

, most object databases do not support user defined primary keys , even though this is very useful in almost every application. ObjectDB supports user defined primary keys including composite primary keys

Database Explorer

). An entity object can be specified by type and primary key separated by # (e.g. Point#1). A collection ... to an existing entity object, which has to be specified by type and primary key separated by # (e.g. Point ... object, which has to be specified by type and primary key separated by # (e.g. Point#1). The Edit

Index Definition

) if different entities have the same value in a unique field (similar to how primary keys behave ... fields (not on primary key / version fields). Composite Index A composite index is an index ... system rather than in memory. The keys of the BTree are all the unique values in the indexed field (or arrays of values

jakarta.persistence.EntityManager

(defined by an entity type and primary key ) there is at most one entity instance. The entity instances ... their primary key , and execute queries which range over entity types. An entity may be disassociated from ... , Object primaryKey ) Find by primary key . Search for an entity of the specified class and primary key

JPA Annotations for Value Generation

Automatically generated values are mainly useful for primary key fields, but are supported by ObjectDB also for regular (non primary key ) persistent fields. At the field level, the @GeneratedValue with an optional GenerationType strategy is specified: The @GeneratedValue annotation

JPA Annotations for Classes

are useful in representing composite primary keys as explained in the Primary Key section of the ObjectDB manual.

ORDER BY clause (JPQL / Criteria API)

Country objects ordered by currency as the primary sort key and by name as the secondary sort key ... expression is the primary order expression. Any additional order expression is used to order results

jakarta.persistence.PrimaryKeyJoinColumn

Interfaces: Annotation Target: Type, Method, Field Specifies a primary key column that is used as a foreign key to join to another table. It is used to join the primary table of an entity subclass in ... which the primary key of the referencing entity is used as a foreign key to the referenced entity

jakarta.persistence.criteria.MapJoin.key()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.MapJoin Path key () Create a path expression that corresponds to the map key . Returns: path corresponding to map key . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.keys(M)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression keys (    M map ) Create an expression that returns the keys of a map. Parameters: map - map Returns: set expression. Since: Jakarta Persistence (JPA) 1.0

JPA Persistable Types

, however, do not have an identity ( primary key ) of their own which leads to some limitations (e.g ... and map types are supported, as long as their values (i.e. elements in collections and arrays and keys

Storing JPA Entity Objects

already contains another entity of the same type with the same primary key , an EntityExistsException

Detached Entity Objects

with the same identity (i.e. same type and primary key ). If the EntityManager does not manage such an entity

JPA Metamodel API

manner. The IdentifiableType adds methods for retrieving information on the primary key

Shared (L2) Entity Cache

and primary key : em. find (MyEntity2.class, Long.valueOf(1),      Collections

Comparison in JPQL and Criteria API

(=, , == , != ). For entities, e1 = e2 if e1 and e2 have the same type and the same primary key value

JPA Exceptions

because of an attempt to store a new entity object with a primary key that is already in use by another existing

jakarta.persistence.SecondaryTable

properties of the entity are mapped to the primary table. If no primary key join columns are specified, the join columns are assumed to reference the primary key columns of the primary table, and have the same names and types as the referenced primary key columns of the primary table. Example 1: Single

jakarta.persistence.GenerationType

Enumerates the defined primary key generation strategies. See Also: GeneratedValue Since: Jakarta ... for the particular database. For a primary key of type UUID or String , this is equivalent to UUID . For a primary key of type Long , Integer , long , or int , the provider selects between TABLE , SEQUENCE

jakarta.persistence.JoinColumn

of the referencing entity or embeddable class; " _ "; the name of the referenced primary key column ... : the name of the entity; " _ "; the name of the referenced primary key column. Default: "" Since: Jakarta ... (only applies if single join column is being used): The same name as the primary key column

jakarta.persistence.TableGenerator

Interfaces: Annotation Target: Type, Method, Field, Package Defines a primary key generator ... generator may be specified on the entity class or on the primary key field or property. The scope ... is explicitly specified, and the annotation occurs on an entity class or primary key attribute of an entity

jakarta.persistence.MapsId

the mapping for an EmbeddedId primary key , an attribute within an EmbeddedId primary key , or a simple primary key of the parent entity. The value element specifies the attribute within a composite key to which the relationship attribute corresponds. If the primary key of the entity is of the same

jakarta.persistence.MapKey

is itself the primary key or a persistent field or property of the entity that is the value of the map. If a persistent field or property other than the primary key is used as a map key ... (mappedBy = "department") @MapKey // map key is primary key public Map getEmployees() {... } ... } @Entity

jakarta.persistence.MapKeyJoinColumn

the primary key column of the referenced table. Default: "" Since: Jakarta Persistence (JPA) 1.0 boolean ... key mapping strategy, the name of the primary table of the entity that is the value of the map ... Interfaces: Annotation Target: Method, Field Specifies a mapping to an entity that is a map key . The map

jakarta.persistence.IdClass

: Annotation Target: Type Specifies a composite primary key type whose fields or properties map to the identifier fields or properties of the annotated entity class. The specified primary key type ... equality consistently with equality of the mapped primary key of the database table. The primary key fields

jakarta.persistence.EmbeddedId

of an entity class or mapped superclass is the composite primary key of the entity. The type of the annotated ... . The embedded primary key type must implement Annotation.java.lang.annotation.Annotation/equals(Object ... with equality of the mapped primary key of the database table. The AttributeOverride annotation may be used

jakarta.persistence.GeneratedValue

Interfaces: Annotation Target: Method, Field Specifies a generation strategy for generated primary keys . The GeneratedValue annotation may be applied to a primary key property or field of an entity or mapped ... to support the GeneratedValue for simple primary keys . Use of the GeneratedValue annotation for derived

jakarta.persistence.MapKeyColumn

to only a single column. This constraint applies in addition to any constraint entailed by primary key mapping ... : Annotation Target: Method, Field Specifies the mapping for the key column of a map whose map key ... of the following: the name of the referencing relationship field or property; " _ "; " KEY ". Example: @Entity

jakarta.persistence.Id

: Annotation Target: Method, Field Identifies the primary key of an entity. The field or property ... for the primary key of the entity is assumed to be the primary key of the primary table. If no Column annotation is specified, the primary key column name is assumed to be the name of the primary key property

jakarta.persistence.SequenceGenerator

Interfaces: Annotation Target: Type, Method, Field, Package Defines a primary key generator ... generator may be specified on the entity class or on the primary key field or property. The scope ... is explicitly specified, and the annotation occurs on an entity class or primary key attribute

jakarta.persistence.JoinTable

to be the table names of the associated primary tables concatenated together (owning side first ... to the concatenated names of the two associated primary entity tables, separated by an underscore ... Persistence (JPA) 1.0 JoinColumn[] joinColumns (Optional) The foreign key columns of the join table

jakarta.persistence.PrePersist

class. A generated primary key value is available when this callback occurs only for UUID , TABLE , or SEQUENCE primary key generation. For IDENTITY primary key generation, the generated primary key

jakarta.persistence.Entity

, a one-to-one association usually maps to a unique foreign key relationship (sometimes using a shared primary key ... class must have at least one field or property annotated Id or EmbeddedId holding the primary key ... interface may not be designated as an entity. An entity has a primary table, mapped using the Table

Query on primary key is slow when using 'IN'

Hi! We have an entity with a composite primary key on "primaryVariantOid" and "storeOid" fields ... entityManager.find to look up every entity by the primary key . This ended up being even faster ... was also trying to find if there was any API like entityManager.find, but for bulk retrieval by primary keys

jakarta.persistence.Table

by the Column and JoinColumn annotations and constraints entailed by primary key mappings. Defaults ... that it is not necessary to specify an index for a primary key , as the primary key index is created automatically ... : Annotation Target: Type Specifies the primary table mapped by the annotated entity type. Additional tables