Home » Search

About getReference

1-7 of 7Refresh
JPA Doc
117

getReference(entityClass, primaryKey)

Method javax.persistence.EntityManager T getReference(   Class entityClass,   Object primaryKey ) Get an instance, whose state may be lazily fetched. If the requested instance does not exist in ... . (The persistence provider runtime is permitted to throw the EntityNotFoundException when getReference
Manual
114

Retrieving JPA Entity Objects

is returned. A similar method, getReference, can be considered the lazy version of find: Employee employee = em.getReference(Employee.class, 1); The getReference method works like the find method ... accessed. The getReference method is useful when a reference to an entity object is required but not
JPA Doc
12

javax.persistence.EntityManager

Since: JPA 2.0 T getReference(Class entityClass, Object primaryKey) Get an instance, whose state ... when getReference is called.) The application should not expect that the instance state will be available
JPA Doc
12

javax.persistence.EntityNotFoundException

EntityManager.getReference is accessed but the entity does not exist. Thrown when EntityManager.refresh ... , if one is active, will be marked for rollback. Since: JPA 1.0 See Also: EntityManager.getReference
Forum
6

How to Use a SF with extended Persistence Context?

.ViewManagedReferenceFactory.getReference(ViewManagedReferenceFactory.java:52) [jboss-as-ee-7.1.1.Final ... .ViewManagedReferenceFactory.getReference(ViewManagedReferenceFactory.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final ... .component.ViewManagedReferenceFactory.getReference(ViewManagedReferenceFactory.java:52) [jboss-as-ee
Forum
3

Persist error @ManyToMany how to define correct entities relationships

(possibly using em.getReference) rather than create new Category instances. You may also consider using
Forum
3

Searching lists within objects

.getReference(Attribute.class, williamLastNameAttribute.getId()); which is fine in a test where I