Merge pull request #2380 from cit-consulting/isToManyDirty_cce

WIP: Try to fix ClassCastException in isToManyDirty() check
This commit is contained in:
Rob Bygrave
2021-09-22 14:00:19 +12:00
committed by GitHub
10 changed files with 297 additions and 3 deletions
@@ -2875,8 +2875,8 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
final EntityBeanIntercept ebi = bean._ebean_getIntercept();
for (BeanPropertyAssocMany<?> many : propertiesManySave) {
if (ebi.isLoadedProperty(many.propertyIndex())) {
final BeanCollection<?> value = (BeanCollection<?>) many.getValue(bean);
if (value != null && value.hasModifications()) {
final Object value = many.getValue(bean);
if (value instanceof BeanCollection && ((BeanCollection<?>)value).hasModifications() || value != null) {
return true;
}
}