Hi, Which version of OpenJPA are you using? I tried reproducing the problem with OpenJPA 1.3.0-SNAPSHOT, and I only see the issue if I have not enhanced the entities. In your previous email you mentioned that you're using build time enhancement (IIRC). OpenJPA's handling of detached entites was improved under OpenJPA-245 (look at Abe's changes not mine). If you're running on an earlier version of OpenJPA that might be part of the problem.
-mike On Fri, Sep 26, 2008 at 4:45 AM, egoosen <[EMAIL PROTECTED]>wrote: > > Further to my previous post, I came across this in the OpenJPA > documentation > which seemed promising: > > 1.3.1. Detached State Field > > When the detached state field is enabled, the OpenJPA enhancer adds an > additional field to the enhanced version of your class. This field of type > Object. OpenJPA uses this field for bookkeeping information, such as the > versioning data needed to detect optimistic concurrency violations when the > object is re-attached. > > It is possible to define this detached state field yourself. Declaring this > field in your class metadata prevents the enhancer from adding any extra > fields to the class, and keeps the enhanced class serialization-compatible > with the unenhanced version. The detached state field must not be > persistent. See Section 3.1.3, "Detached State" for details on how to > declare a detached state field. > > Unfortunately, the state field is of type Object (not serializable), so I > can't copy this field to my GWT-friendly DTO. > > Since OpenJPA is smart enough to know that no fields have been modified it > shouldn't be much extra code to prevent the version column update. I guess > we'll need to add a patch to the OpenJPA code. > > -- > View this message in context: > http://n2.nabble.com/Non-dirty-entity-version-field-update-SUPER-URGENT%21%21%21-tp1120307p1120452.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > >
