OpenJPA throws an exception if a query uses a field mapped as a @Version. This happens because FieldMappings for fields that are @Version do not have any columns, since the columns are managed separately by the owning ClassMapping's version indicator.
Description
OpenJPA throws an exception if a query uses a field mapped as a @Version. This happens because FieldMappings for fields that are @Version do not have any columns, since the columns are managed separately by the owning ClassMapping's version indicator.
This patch resolves this bug and also OPENJPA-275. It is possible to decouple this from OPENJPA-275 if it is deemed that OPENJPA-275 is not desirable. Thoughts?
Patrick Linskey added a comment - 01/Jul/07 09:24 PM This patch resolves this bug and also OPENJPA-275. It is possible to decouple this from OPENJPA-275 if it is deemed that OPENJPA-275 is not desirable. Thoughts?
OPENJPA-274, OPENJPA-275. Improved our bulk update support to automatically increment version counters as necessary if an UPDATE query does not maintain the version fields itself. Also fixed a bug with all queries involving version fields by changing FieldMappings representing version fields to return their owning ClassMapping's Version's columns from a getColumns() call.
OPENJPA-275. It is possible to decouple this fromOPENJPA-275if it is deemed thatOPENJPA-275is not desirable. Thoughts?