About getReference

manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... null is returned. A similar method, getReference getReference(entityClass, primaryKey) EntityManager's method Get an ... version of find : Employee employee = em. getReference getReference(entityClass, primaryKey) EntityManager's ...

 
api-jpa

getReference(entityClass, primaryKey)

Get an instance, whose state may be lazily fetched.(Method of javax.persistence.EntityManager)

 
api-jpa

javax.persistence.EntityManager

Interface used to interact with the persistence context.(Interface of JPA)

 
forum_thread

Searching lists within objects

Hi everyone,  I've a problem with searching on lists. I'm uncertain as to what the best form is, so I've created a maven project with all the classes and a unit test showing my issue. Pretty much I want to search using cb.isMember passing an object. This however does NOT work. I'm uncertain how the database is doing its matching, but it looks to me like it matches using objectids, which means you can only match isMember if you have a database object. This does not help as I'm never going to have the real object at search time. ... use: Attribute attributeLastName = em. getReference ( Attribute . class , williamLastNameAttribute. ...