openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egoosen <egoos...@metropolitan.co.za>
Subject Re: how to run an readonly query that won't update the version field?
Date Thu, 25 Sep 2008 15:07:47 GMT

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.


Mingfai wrote:
> 
> sorry guys. just found a relevant discussion.
> http://www.mail-archive.com/users@openjpa.apache.org/msg02112.html
> 
> it seems my problem is caused as i'm not using neither build-time or
> runtime
> enhancement (javaagent) . I tried to use spring-agent to do the weaving
> before but not too successful. Looks like I have to spend some more time
> to
> check about weaving/enhancement . Thanks.
> 
> regards,
> mingfai
> 
> 

-- 
View this message in context: http://n2.nabble.com/how-to-run-an-readonly-query-that-won%27t-update-the-version-field--tp837072p1118366.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message