
|
If you were logged in you would be able to see more operations.
|
|
|
|
if replication is called on a non-versioned entity and the entity already exists in the db it can result in the persister it self being stored as the version value for the entity (because AbstractEntityPersister.getCurrentVersion(..) returns any object if row exists and non-versioned).
This result in a NPE in Lock.isPuttable because version is suddenly not null and thus a comparison is done wrongly.
eg.
Caused by: java.lang.NullPointerException
at org.hibernate.cache.ReadWriteCache$Lock.isPuttable(ReadWriteCache.java:460)
at org.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:155)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:153)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
|
|
Description
|
if replication is called on a non-versioned entity and the entity already exists in the db it can result in the persister it self being stored as the version value for the entity (because AbstractEntityPersister.getCurrentVersion(..) returns any object if row exists and non-versioned).
This result in a NPE in Lock.isPuttable because version is suddenly not null and thus a comparison is done wrongly.
eg.
Caused by: java.lang.NullPointerException
at org.hibernate.cache.ReadWriteCache$Lock.isPuttable(ReadWriteCache.java:460)
at org.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:155)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:153)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
|
Show » |
|
replicate now explicilty null's out oldVersion in case of non-versioned persister/entity