Fix for #155 Add markAsDirty() method

This commit is contained in:
Rob Bygrave committed 2014-06-27 23:08:36 +12:00
1 parent 5db7ae504e
commit 6838b4df4f
5 files changed
+118 -1

No files matched your search

@@ -1576,6 +1576,16 @@ public final class DefaultServer implements SpiEbeanServer {
persister.save(checkEntityBean(bean), t);
}
@Override
public void markAsDirty(Object bean) {
if (bean instanceof EntityBean == false) {
throw new IllegalArgumentException("This bean is not an EntityBean?");
}
// mark the bean as dirty (so that an update will not get skipped)
((EntityBean)bean)._ebean_getIntercept().setDirty(true);
}
/**
* Update the bean using the default 'updatesDeleteMissingChildren' setting.
*/