|Re: When a merge does not update? [message #1061736 is a reply to message #1060805]
||Mon, 03 June 2013 16:34
| Everton Fujimoto
Registered: June 2012
Hello, i'm already has make this... The problem, more detailed:|
I'm using Java Server Faces 2.1 Mojarra, Primefaces 3.5, Glassfish 188.8.131.52, Eclipselink 2.4, EJB3 to control transactions and inject EntityManager's.
Using Primefaces LazyDataModel, i'm calling super.getRowData() to get entity to merge, this method find in LazyDataModel inner List the entity, retrieved in other request by TypedQuery (returning the List used from LazyDataModel) and when I get the data from that List, in same request, merge don't store the changes in this object... But, if I get the element (without get by LazyDataModel), directly from entitymanager, merge can update this element.
A very strange is the element, if I get a copy from LazyDataModel, and I get other copy from entityManager, nothing of copy's store with merge.
I think that List in LazyDataModel are a IndirectList from EntityManager, inserted in a LazyDataModel, does not detach the elements from EntityManager after out of the EJB scope (or the Request is finalized), and the changes "poison" the cache... I will make a project example to send here, but this week I have not time...
If is that I think, you know how I can solve? What you think it's?
Powered by FUDForum
. Page generated in 0.01841 seconds