-
1. Re: Why does EntityQuery auto save updates?
terryb Nov 20, 2007 9:04 PM (in response to terryb)I guess it is related to how SEAM handles transactios. I'm using Seam POJOs.
The EntityQuery's getResultSet() method is marked @transactional. Call to getResultSet() commits changes made to Client entity on the jsf form get committed to the database.
Anyone knows why getResultSet() first committed changes to queried Entity. and how I can avoid it in my case?
I guess it's a common issue, I can't find solution since this is my first attempt on such scenarion. -
2. Re: Why does EntityQuery auto save updates?
pmuir Nov 21, 2007 5:00 AM (in response to terryb)The persistence context is automatically flushed at container invoked method boundaries unless you use flush mode manual.
-
3. Re: Why does EntityQuery auto save updates?
terryb Nov 21, 2007 9:13 AM (in response to terryb)thanks Pete, yeah I figured that out.
in my case I have a single jsf page. to get my code working, now I specified its scople to conversation; and save the current entity record in page action method, and then use it in update action method to compare if required data columns have been modified by the user.
I am not sure if that is the right way, when wanting to compare user changes with record data in database? but it now works for me.