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:
Richard G. Curtis 2010-01-21 22:39:19 +00:00
parent ec8dba1465
commit 55d7af6e23
1 changed files with 2 additions and 4 deletions

View File

@ -3053,10 +3053,8 @@ public class StateManagerImpl
// make sure version information has been set; version info must
// 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
// method is being called after a field is set)... some instances
// might not have version info, in which case this gets called
// multiple times; that should be ok too
if (_loadVersion == null) {
// method is being called after a field is set)
if (_loadVersion == null && (_meta == null || _meta.getVersionField() != null)) {
syncVersion(sdata);
ret = ret || _loadVersion != null;
}