#296 - ENH: Add to transaction setUpdateAllLoadedProperties() - force update all properties api

This commit is contained in:
Robin Bygrave committed 2015-07-24 21:56:11 +12:00
1 parent 3baa5bca46
commit d396f09b3a
9 files changed
+221 -43

No files matched your search

@@ -110,12 +110,17 @@ public final class UpdateMeta {
private SpiUpdatePlan getDynamicUpdatePlan(ConcurrencyMode mode, PersistRequestBean<?> persistRequest) {
// we can use a cached UpdatePlan for the changed properties
EntityBeanIntercept ebi = persistRequest.getEntityBeanIntercept();
int hash = ebi.getDirtyPropertyHash();
int hash;
if (persistRequest.getTransaction().isUpdateAllLoadedProperties()) {
hash = ebi.getLoadedPropertyHash();
} else {
hash = ebi.getDirtyPropertyHash();
}
BeanDescriptor<?> beanDescriptor = persistRequest.getBeanDescriptor();
BeanProperty versionProperty = beanDescriptor.getVersionProperty();