mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#88 - v4 - Breaking API Change - BeanPersistRequest.getOldValues() replaced with ... Map<String,ValuePair> getUpdatedValues()
This commit is contained in:
1 parent
fc628d336d
commit
2344f57f84
13 files changed
+377
-86
No files matched your search
@@ -59,7 +59,7 @@ public class GenerateDmlRequest {
|
||||
return true;
|
||||
}
|
||||
if (changesOnly) {
|
||||
return ebi.isChangedProperty(prop.getPropertyIndex());
|
||||
return ebi.isDirtyProperty(prop.getPropertyIndex());
|
||||
} else {
|
||||
return ebi.isLoadedProperty(prop.getPropertyIndex());
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.avaje.ebeaninternal.api.SpiUpdatePlan;
|
||||
import com.avaje.ebeaninternal.server.core.PersistRequestBean;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanProperty;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne;
|
||||
import com.avaje.ebeaninternal.server.persist.dmlbind.Bindable;
|
||||
import com.avaje.ebeaninternal.server.persist.dmlbind.BindableId;
|
||||
import com.avaje.ebeaninternal.server.persist.dmlbind.BindableList;
|
||||
@@ -115,20 +114,10 @@ public final class UpdateMeta {
|
||||
// we can use a cached UpdatePlan for the changed properties
|
||||
|
||||
EntityBeanIntercept ebi = persistRequest.getEntityBeanIntercept();
|
||||
int hash = ebi.getChangedPropertiesHash();
|
||||
int hash = ebi.getDirtyPropertyHash();
|
||||
|
||||
BeanDescriptor<?> beanDescriptor = persistRequest.getBeanDescriptor();
|
||||
|
||||
BeanPropertyAssocOne<?>[] propertiesEmbedded = beanDescriptor.propertiesEmbedded();
|
||||
for (int i=0; i< propertiesEmbedded.length; i++) {
|
||||
EntityBean embeddedBean = (EntityBean)propertiesEmbedded[i].getValue(persistRequest.getEntityBean());
|
||||
if (embeddedBean == null) {
|
||||
hash = hash * 31;
|
||||
} else {
|
||||
hash = hash * 31 + embeddedBean._ebean_getIntercept().getChangedPropertiesHash();
|
||||
}
|
||||
}
|
||||
|
||||
BeanProperty versionProperty = beanDescriptor.getVersionProperty();
|
||||
if (versionProperty != null) {
|
||||
if (ebi.isLoadedProperty(versionProperty.getPropertyIndex())) {
|
||||
|
||||
Reference in new issue
Block a user