object « EntityManager « JPA Q&A





1. How can i get the session object if i have the entitymanager    stackoverflow.com

I have

private EntityManager em;

public List getAll(DetachedCriteria detachedCriteria)   {

    return detachedCriteria.getExecutableCriteria( ??? ).list();
}
How can i retrieve the session if am using entitymanager or how can i ...

2. EntityManager.merge() issues SELECT's on all entities in the object graph    stackoverflow.com

I'm using JPA 2 and Hibernate 3. I noticed that calling EntityManager.merge() causes a SELECT on every referenced entity in the object graph PLUS inner joins between some of them. Suppose you ...

3. EJB 3 + JPA2 = Deserialized Object with null fields    stackoverflow.com

I have a JPA Annotated Object and a EJB remote interface in one jar and the EJB Stateless implementation with the Entity Manager injected deployed in a war file. My client ...

4. Managing a Derived, Read-Only Object with an EntityManager?    forum.hibernate.org

Hi I'm building an application with Hibernate 3.5.6 and Spring. The application defines objects that are mapped onto a number of database tables and are managed successfully by an EntityManager. Now I want to create a 'derived' object which contains fields that are drawn from several different existing tables. The POJO is simple to define. The SQL query that delivers a ...

5. Problem trying to re-attach objects when using EntityManager    forum.hibernate.org

Using Hibernate 3.2.6GA and EntityManager 3.3.2GA Let's say I have created the following set of classes (pseudo/partial code) User dbId DB generatedlong loginid unique string name string firstname string Thing dbId DB generatedlong name string ... cascading is defaulting to all in all my hibernate defined entities in my J2EE ...