This is incosistent with the semantic of the 'inverse="true"' flag on bidirectional one-to-many and many-to-many associations. In such associations the version on both sides of the association is incremented. Is this then a bug?
Also, the JPA spec did not exactly says that relationships owned by the entity must not be included in version checks, it justs says the relationships owned by the entity must be included. However, if we use the version not only for optimistic locking but fo tracking entity changes, including not-owned relationships into version checks makes sense.
|