Fast Object Database for Java - with JPA/JDO support

About getReference

1-8 of 8 resultsRefresh
121

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 is called
89

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
11

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
11

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
11

javax.jdo.JDOEntityManager

for entity manager Since: JPA 2.0 T getReference(Class entityClass, Object primaryKey) Get an instance ... the EntityNotFoundException when getReference is called.) The application should not expect that the instance state
5

How to Use a SF with extended Persistence Context?

to instantiate component view at org.jboss.as.ee.component.ViewManagedReferenceFactory.getReference ... .Final] at org.jboss.as.ee.component.ViewManagedReferenceFactory.getReference ... .getReference(ViewManagedReferenceFactory.java:52) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as
2

Persist error @ManyToMany how to define correct entities relationships

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

Searching lists within objects

.getResultList(); If I try to use isMember I have to use: Attribute attributeLastName = em.getReference

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support