About Id

forum_thread

java 8 LocalDateTime is not working in query

My entity class has a field of type java.time.LocalDateTime. I'm able to persist entities and I'm able to query without datetime field in where clause, but with datetime in where clause doesn't return anything and not exception.   ... class MyEntity {   @ Id private Long id ;   @ Convert ( converter = ... Long getId ( ) { return id ; }   public void setId ( Long id ...

 
issue

Blocked by find

I have a container object which wraps an objectdb database. There is a "putIfAbsent(String id, Object obj)" method which is synchronized and attempts to load an object by id using the EntityManager "find" method. If nothing is returned from the db the passed object is persisted to the db. I have 5 threads which use this method. In a run today one of the threads seems to have got stuck somewhere in the find. The thread dump looks like: ... wraps an objectdb database. There is a "putIfAbsent(String id, Object obj)" method which is synchronized and attempts to load an object by id using the EntityManager "find" method. If nothing is returned from the db ...

 
forum_thread

Performance in SELECT statement

Hello, I have the following 2 entities : ... implements LocalEntity { @ Id @ GeneratedValue private Long key ; ...

 
forum_thread

Unexpected behaviour upon update. Bug?

This sample does not work as I expect.  Why?  Is it a bug? Below is the complete program. Expect: 3 Get: 4 import java.io.Serializable; import java.util.List; import javax.persistence.*; @Entity public class Update implements Serializable   {     @Id     int i;     int v; ... implements Serializable { @ Id int i ; int v ;   public static ...

 
api-jpa

javax.persistence.Embeddable

Defines a class whose instances are stored as an intrinsic part of an owning entity and share the identity of the entity.(Annotation of JPA)

 
api-jpa

javax.persistence.OrderColumn

Specifies a column that is used to maintain the persistent order of a list.(Annotation of JPA)

 
api-jpa

javax.persistence.ElementCollection

Defines a collection of instances of a basic type or embeddable class.(Annotation of JPA)

 
forum_thread

Failing to read entities under load in multithreaded tests

Hi, We are experiencing an issue in our application that only occurs under load - we sometimes fail to read entities from the database. ... private long longId ;   @ Id @ GeneratedValue ( strategy = ...

 
forum_thread

removed objects stay with null field values in the reference

We have a class with a one to many relationship declared like this (1 or more objects of the same class are linked into the relationship, no circular referencing): ... long serialVersionUID = 1L ;   @ Id public String uUid ;   ...   @ OneToMany ...

 
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: ... <property name="eclipselink.id-validation" value="NULL"/>   Is there a similar ... static class MyEntity { @ Id long id ; } } There is a problem with using the ...