Merge pull request #2380 from cit-consulting/isToManyDirty_cce

WIP: Try to fix ClassCastException in isToManyDirty() check
This commit is contained in:
Rob Bygrave authored and GitHub committed 2021-09-22 14:00:19 +12:00
commit 57689db291
10 files changed
+297 -3

No files matched your search

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