mirror of https://github.com/apache/openjpa.git
OPENJPA-1475: Exclude calling syncVersion() if an Entity doesn't have a version field. Patch submitted by Dianne Richards.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@901901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ec8dba1465
commit
55d7af6e23
|
@ -3053,10 +3053,8 @@ public class StateManagerImpl
|
||||||
// make sure version information has been set; version info must
|
// make sure version information has been set; version info must
|
||||||
// always be set after the first state load or set (which is why
|
// always be set after the first state load or set (which is why
|
||||||
// we do this even if no fields were loaded -- could be that this
|
// we do this even if no fields were loaded -- could be that this
|
||||||
// method is being called after a field is set)... some instances
|
// method is being called after a field is set)
|
||||||
// might not have version info, in which case this gets called
|
if (_loadVersion == null && (_meta == null || _meta.getVersionField() != null)) {
|
||||||
// multiple times; that should be ok too
|
|
||||||
if (_loadVersion == null) {
|
|
||||||
syncVersion(sdata);
|
syncVersion(sdata);
|
||||||
ret = ret || _loadVersion != null;
|
ret = ret || _loadVersion != null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue