About Id



Used to override a mapping for an entity relationship.(Annotation of JPA)


Field in Generic Class not persisted?

Hi, I am trying to persist a class which is extended from an abstract class - but fields declared inside the abstract class are not persisted - is that expected? I assume it can be done b/c this field can be recovered after serialisation/deserialization. Here is an code to demonstrate the problem Thanks   ... ; import javax. persistence . Id ; import javax. persistence . Persistence ; import ... extends ABS<Long, OBJ6> { @ Id @ GeneratedValue long id ; private long ...


ObjectDb Doctor : Failed to locate set method for field property com.test.Video$VideoId.sourceId using reflection (error 316)

Hello everyone ! I have just launched the ObjectDb Doctor for testing purposes. But while inspecting my base, the Doctor throws me a strange error : [ObjectDB 2.4.6] Invalid ID class com.test.Video$VideoId for type com.test.Video (Failed to locate set method for field property com.test.Video$VideoId.sourceId using reflection) (error 316) It seems that the Doctor can't find the SourceId, that is a part of my primary key. There is a description of my Video bean :   ... me a strange error : [ObjectDB 2.4.6] Invalid ID class com.test.Video$VideoId for type com.test.Video (Failed to ... protected String sourceId ;   @ Id public String getSourceId ( ) { ...


Internal exception when updating date filed (TemporalType.DATE)

Hello! ObjectDB version 2.5.3_02. I get internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). ... entityManager. createQuery ( "select count(p.id) from Person p" ) ; return ( Long ...   @ Id private String id = UUID. randomUUID ( ) . toString ( ) ...


Queries are slow on a large database

Hi, I have a 12GB database with 787603 entries. It is much larger than usual and there are performances issues. I am doing small queries and they take much longer than I expect, i.e.: Get the total number of entries Get 25 consecutive entries (i.e. 0-25) Get one specific entry On average each query needs 4 to 5 minutes to return a result. I have been adviced to use indexes but they are already used through the JDO Metadata file. For instance I use this class: ... Comparable {   private int Id ; private int logTestRunId ; private int ... ) ; query. setOrdering ( "this.Id ascending" ) ; The package.jdo contains for this ...


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 : ... keys are annotated as shown below : @ Id @ SequenceGenerator ( name = "SEQ_BOARD" , ... static class A { @ Id @ SequenceGenerator ( name = "SEQ_BOARD" ...


EntityManager refresh problem

Dear Support, in the following code you can see a EntityManager.refresh() example. The example throws an assertion error with the following statement: Assert.assertEquals("entity 1", simpleEntity1.getFieldA()); In my opinion there should be no assertion error. I have tested the example with several objectdb versions (2.5.4, 2.5.6_06 and 2.5.7). Do you have an explanation for the assertion error? ... ; import javax. persistence . Id ;   @ Entity public class SimpleEntity {   @ Id @ GeneratedValue private Long primaryKey ; ...


@OneToOne query issue with OR and IS NULL

Hello, I'm struggeling to get a query run right. I have 2 entities (simplified) ... (simplified) class A { @ Id @ GeneratedValue private Long key ; ... }   class B { @ Id @ GeneratedValue private Long key ; ...



Specifies the map key for associations of type java.util.Map when the map key is itself the primary key or a persistent field or property of the entity that is the value of the map.(Annotation of JPA)



Specifies a composite primary key class that is mapped to multiple fields or properties of the entity.(Annotation of JPA)