Fix Transaction Flushing when ID Property is Loaded (#1450)

* Fix for unintentianal flush when ID is loaded

* fix duplicateKey Exception

* higher id
This commit is contained in:
Mitsch164
2018-07-12 15:10:17 +12:00
committed by Rob Bygrave
parent 2755e6d1ec
commit 5b8ef8154a
3 changed files with 85 additions and 3 deletions
@@ -3160,6 +3160,10 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
public boolean hasIdPropertyOnly(EntityBeanIntercept ebi) {
return ebi.hasIdOnly(idPropertyIndex);
}
public boolean isIdLoaded(EntityBeanIntercept ebi) {
return ebi.isLoadedProperty(idPropertyIndex);
}
public boolean hasIdValue(EntityBean bean) {
return (idProperty != null && !DmlUtil.isNullOrZero(idProperty.getValue(bean)));