[
https://issues.apache.org/jira/browse/OPENJPA-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-1451.
--------------------------------------
Resolution: Fixed
Already fixed on master: This already exists as the state-comparison version
strategy, which compares the old values of dirty fields in the UPDATE WHERE
clause (StateComparisonVersionStrategy.java, ALIAS "state-comparison"). It can
be set with @VersionStrategy or openjpa.jdbc.MappingDefaults VersionStrategy
(ref_guide_mapping.adoc:406). Closing; please reopen if this still happens with
OpenJPA 4.x.
> Provide additional optimistic lock options
> ------------------------------------------
>
> Key: OPENJPA-1451
> URL: https://issues.apache.org/jira/browse/OPENJPA-1451
> Project: OpenJPA
> Issue Type: Improvement
> Affects Versions: 2.0.0-M3
> Reporter: Grzegorz Borkowski
> Priority: Major
>
> The standard @Version -based optimistic locking in JPA is too much limited in
> many cases. Often you need to have optimistic lock more column(cell)-level
> then record-level based. It can be accomplished by using old value of the
> modified column(s) in WHERE clause, instead of using @Version column. Other
> JPA implementations already provide such extensions, it would be good if
> OpenJPA had it too.
> E.g. in Hibernate it'd done by:
> @org.hibernate.annotations.Entity(optimisticLock=DIRTY)
> and in EclipseLink:
> @org.eclipse.persistence.annotations.OptimisticLocking(type=CHANGED_COLUMNS)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)