On 2 June 2014 14:46, Albert Lee wrote:
> @Version is used to support optimistic locking semantics at the object
> level and bear no implication to db row or ownership.
>
> "In what circumstances would the Parent version be bumped by one?"
>
> When an entity is changed and needs to be updated bac
@Version is used to support optimistic locking semantics at the object
level and bear no implication to db row or ownership.
"In what circumstances would the Parent version be bumped by one?"
When an entity is changed and needs to be updated back to the database row,
the version field must be inc
Hi,
I have classes mapped like this:
class Parent {
@Id
int parentId;
@Version
int version;
@OneToMany(...)
List children;
}
class Child
{
@Id
int childId;
... // no relationship to parent, its uni-directional
}
The foreign key is on the CHILD table, but in JPA par