[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] @Version field does partially update?

Hi,

I have a problem with the @Version annotated field. Working with a Superclass 'AbstractEntity with the fields annotated with @Id and @Version and two subclasses, say Parent and Child, where Parent has a @OneToMany to Child, I try to update the parent object containing several already persistent children using the merge method. In the database (mysql 5.0) the version field is updated (oldValue + 1), but in the entities property (int version, annotated with @Version), the value stays the same. A second merge fails then, because the version field in the database is higher than that in the entity.

Has anybody an idea what I am doing wrong?

Thank you in advance!

Christian