About primary key
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 ...
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 ...
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 ...
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 ...
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 ...
ObjectDB Object Database Features
ObjectDB provides a rich set of features, many of them as the result of supporting the JPA and JDO APIs.... Features that are common in relational databases (e.g. primary keys, automatically generated values, grouping queries and aggregate ... JPA annotation Specifies the primary key of an entity. See JavaDoc Reference Page... , @Index ...
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 ...
Primary key generation problem after changing entity package
Hi, I changed package name for some of my entities in database. I added info in <schema><package... /></schema> of my configuration file - and the changes have been succesfully made in database. Unfortunately, sequences have been probably lost for changed entity classes. After schema change I keep getting errors : Attempt to reuse an existing primary key value... My primary keys are annotated as shown below : ... I keep getting errors : Attempt to reuse an existing primary key value... My primary keys are annotated as shown below : @ ...
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: ... I am getting an intermittent "Attempt to reuse an existing primary key value". In this particular instance, the error is: Attempt to reuse ...