About reference

api-jpa

LockModeType.NONE

No lock.(Enum Constant of javax.persistence.LockModeType)

 
api-jpa

LockModeType.WRITE

Synonymous with OPTIMISTIC_FORCE_INCREMENT.(Enum Constant of javax.persistence.LockModeType)

 
api-jpa

LockModeType.PESSIMISTIC_FORCE_INCREMENT

Pessimistic write lock, with version update.(Enum Constant of javax.persistence.LockModeType)

 
forum_thread

Suspected memleak caused by bad state of EntityManager

Our application manages the Entities itself, so we close the EntityManager after every creating and using. We find a slow memleak in our application recently, and by trace of Entity construct and finalize, we found the problem is caused by bad state of EntityManager. After first throwing the InternalException, the EntityManager throws every time when doing merge operation, but it can be closed and retrieved by EntityManagerFactory, and the instances of Entity constructed by ObjectDB can never be released by JVM.There is a chart describes the instances exists in memory. #1 2012-02-03 02:03 Our application manages the Entities itself, so we close the EntityManager after every creating and using. We fin ...

 
api-jpa

javax.persistence.OneToOne

Defines a single-valued association to another entity that has one-to-one multiplicity.(Annotation of JPA)

 
api-jpa

executeUpdate()

Execute an update or delete statement.(Method of javax.persistence.Query)

 
api-jpa

getSingleResult()

Execute a SELECT query that returns a single result.(Method of javax.persistence.TypedQuery)

 
api-jpa

javax.persistence.criteria.CriteriaBuilder

Used to construct criteria queries, compound selections, expressions, predicates, orderings.(Interface of JPA)

 
forum_thread

Some details about db behavior

Suppose I have two entities... A B -> A B has a ManyToOne relationship with A. When my database is empty and I persist a valid B entity (that contains actual A reference) I observe some behaviour that I'm not sure I understand. ... and I persist a valid B entity (that contains actual A reference) I observe some behavior that I'm not sure I understand. ... successfully, now I remove the A and want B to return null reference (if it is actually referring and not copying information of A) when ...

 
api-jpa

multiselect(selections)

Specify the selection items that are to be returned in the query result.(Method of javax.persistence.criteria.CriteriaQuery)