mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Fix #23 - Covers: unit tests for: stateless updates which fails when executing without...
This commit is contained in:
1 parent
b012720a5e
commit
a7df7da984
12 files changed
+222
-28
No files matched your search
@@ -158,6 +158,18 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> {
|
||||
help.add(bc, detailBean);
|
||||
}
|
||||
|
||||
public boolean isEmptyBeanCollection(EntityBean bean) {
|
||||
Object val = getValue(bean);
|
||||
if (val == null) {
|
||||
return true;
|
||||
}
|
||||
if (val instanceof BeanCollection<?>) {
|
||||
// if empty and not been cleared or elements removed
|
||||
return ((BeanCollection<?>)val).isEmptyAndUntouched();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue(EntityBean bean) {
|
||||
return super.getValue(bean);
|
||||
|
||||
Reference in new issue
Block a user