Since I've some trouble in extracting a significant frame of code, I'll try to put
the question in general terms:
During the same SEAM request to an action (an EJB method), I build a set of entities
navigating relations from other entities returned by different queries, expecting the same
entity can be navigated more than once.
I expected that, in this case, the same Entity (same class & id) would be even the
same Java Object instance (since all the navigations & queries were inside the same
request): but in some case I HAVE TWO DIFFERENT OBJECT INSTANCES (both verified to be
contained in the same EntityManager) FOR THE SAME ENTITY (same class & id).
I thought it were against the JPA specification, can anyone confirm this?
I am trying to play with the Hibernate properties & with the query hints about cache,
but I have had no luck till now.
Does anyone know if the are some specific situations where more objects can represent the
same entity inside the same EntityManager and if it exists some method to avoid this?
Thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109527#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...