Hi guys, I have a problem with the version field updating on merge, even though non of the data has changed. I found this thread, and posted a message, but no one has responded: http://n2.nabble.com/how-to-run-an-readonly-query-that-won%27t-update-the-version-field--td837072.html#a837072 http://n2.nabble.com/how-to-run-an-readonly-query-that-won%27t-update-the-version-field--td837072.html#a837072
This is super urgent! We are going live in roughly 2 weeks time, and this problem is causing optimistic lock exceptions. Here's the problem as logged in the above thread: I'm also experiencing this problem, but I am definitely build time enhancing my classes, and yet the problem persists. In my case, I'm retrieving the model object, then copying the models values to a DTO, to pass to a GWT frontend. After form submit from the frontend, the DTO values get copied to a "new" model object and then merged. When I look at the SQL output, an UPDATE statement is called which only updates the VRS_NBR field, nothing else, since no data has been modified. My guess is that during the process of copying values from the DTO to the model object, the OpenJPA enhancements are lost, which is why the version field is getting incremented. Is this the case, and if so, how can I fix this? NB. Using Dozer to copy from model to DTO and visa versa. -- View this message in context: http://n2.nabble.com/Non-dirty-entity-version-field-update-SUPER-URGENT%21%21%21-tp1120307p1120307.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
