About primary key

manual

JPA Primary Key

Explains how to define and use primary keys in JPA, including composite and embedded primary keys.... Every entity object that is stored in the database has a primary key. Once assigned, the primary key cannot be modified. It represents the ...

 
manual

Auto Generated Values

Explains the different strategies for generating auto values (mainly for primary key fields) in JPA.... specification of generation strategies for the values of primary keys. See JavaDoc Reference Page... annotation specifies ... for that field. This is primarily intended for primary key fields but ObjectDB also supports this annotation for non-key numeric ...

 
manual

Chapter 2 - JPA Entity Classes

Explains how to define and use JPA entity classes and other JPA persistable types.... Persistable Types JPA Entity Fields JPA Primary Key Auto Generated Values Index Definition Database ...

 
manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... following topics: Retrieval by Class and Primary Key Retrieval by Eager Fetch Retrieval by ...

 
forum_thread

problem when primary key value is zero

I am copying data from a postgres database to objectDB. Some of the rows in the postgres table were created by postgres DDL / SQL insert statements and so do not abide by all JPA rules 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 that can be added to persistence.xml like this: ... rules 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 that can be added ...

 
forum_thread

A bidirectional OneToOne association with a shared primary key

Hi, In Hibernate, it is possible (using Hibernate specific annotations) to define a bidirectional @OneToOne association that has a shared primary key, example: http://fruzenshtein.com/bidirectional-one-to-one-primary-key-association/ ... @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 ...

 
forum_thread

More Efficient Primary Keys

Can you give us a recommendation as we can represent the Key (UUID) most efficient? Both in terms of memory usage of the database files, memory usage of the JVM and efficiency for queries. We already need the key before the entities are persisted so that we can build even references. ... Can you give us a recommendation as we can represent the Key (UUID) most efficient? Both in terms of memory usage of the database ... so that we can build even references. a) Composite Primary Key  with two Longs b) Embedded Primary Key with two Longs ...

 
page

ObjectDB Object Database Features

ObjectDB provides a rich set of features, many of them as the result of supporting the JPA and JDO APIs.... APIs. Fundamental features of relational databases (e.g. primary keys, derived attributes, grouping queries and aggregate queries) which ... JPA annotation Specifies the primary key of an entity. See JavaDoc Reference Page... , @Index ...

 
api-jpa

javax.persistence.Id

Specifies the primary key of an entity.(Annotation of JPA)

 
forum_thread

Merge failure with composite primary key

It was working well with previous releases and now is failing: Exception in thread "main" [ObjectDB 2.3.7_20] javax.persistence.EntityNotFoundException Entity is not found: MergeTest#('Hello',0) (error 631) at com.objectdb.jpa.EMImpl.merge(EMImpl.java:451) at MergeTest.main(MergeTest.java:19)   Thanks. ... and build 2.3.7_21 should fix it. The composite primary key issue is unclear, since switching to a single primary key field doesn't ...