#2440 - Re-use existing referenceIdPropertyOnly() method

This commit is contained in:
Rob Bygrave
2021-11-22 14:59:40 +13:00
parent 08e166a9b7
commit 093d111524
@@ -3038,10 +3038,6 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
return ebi.isReference() || referenceIdPropertyOnly(ebi);
}
boolean hasIdPropertyOnly(EntityBeanIntercept ebi) {
return propertiesBaseScalar.length > 0 && ebi.hasIdOnly(idPropertyIndex);
}
public boolean referenceIdPropertyOnly(EntityBeanIntercept ebi) {
return idOnlyReference && ebi.hasIdOnly(idPropertyIndex);
}
@@ -3060,7 +3056,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
}
void setReferenceIfIdOnly(EntityBeanIntercept ebi) {
if (hasIdPropertyOnly(ebi)) {
if (referenceIdPropertyOnly(ebi)) {
ebi.setReference(idPropertyIndex);
}
}