openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <fyw...@yahoo.com>
Subject Re: version field dont work when used in the embeddable class
Date Thu, 05 Nov 2009 17:13:10 GMT
In current openjpa implementation, version field in the embeddable is not supported. The rationale
is embeddable is not an identifiable object, it can not be modified independently of its owning
entity, so there is no need for the version field in the embeddable to keep track of its change.
Also, unlike inheritance, the version field in the embeddable is not propogated to its owning
entity. Think of an example of an entity which has many embeddable fields or a collection
of embeddables, if every embeddable has its own version field, and if they are all propagated
to the owning entity, the owning entity may end up with multiple version fields. which is
not allowed.    




----- Original Message ----
From: "javadiahad@gmail.com" <javadiahad@gmail.com>
To: dev@openjpa.apache.org
Sent: Thu, November 5, 2009 12:06:45 AM
Subject: version field dont work when used in the embeddable class


Hi 
In my application I have an embeddable class that contain some common fields
including version field .when I put version field in the main class
everything is good and OpenJPA increment the version field value and throw
optimistic exception when concurrent write occur .But when I put the version
field on the embeddable class  openJPA don’t do anything. Is this is a bug
in the OpenJPA ? or I am misusing the embeddable class?
Please help me
Thanks
Ahad Javadi

-- 
View this message in context: http://n2.nabble.com/version-field-dont-work-when-used-in-the-embeddable-class-tp3950794p3950794.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.



      

Mime
View raw message