If someone can point me in the right direction I would be very appreciative.
@Version not working as I expected with cascade saving.
I have 2 classes: PARENT_CLASS and CHILD_CLASS.
PARENT_CLASS contains a set of CHILD_CLASS.
Both class PARENT_CLASS and CHILD_CLASS have a field annotated @Version.
If I call merge() on either PARENT_CLASS or CHILD_CLASS their respective version number is incremented.
However, if I add a new instance of CHILD_CLASS as a child to an instance of PARENT_CLASS and then call merge() on parent instance, the version number for the PARENT_CLASS is incremented, but the CHILD_CLASS version is inserted into the database as 0 when the merge is cascaded to the child.
|