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 authored and Rob Bygrave committed 2018-07-12 15:10:17 +12:00
1 parent 2755e6d1ec
commit 5b8ef8154a
3 files changed
+85 -3

No files matched your search

@@ -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)));