#115 - Mapping - Add support for @ElementCollection enhancement

Add embedded bean support
This commit is contained in:
Rob Bygrave committed 2018-03-28 13:22:46 +13:00
1 parent cca837bcfa
commit 57870aaa05
30 files changed
+1247 -243

No files matched your search

@@ -1,5 +1,6 @@
package io.ebeaninternal.server.persist;
import io.ebean.bean.BeanCollection;
import io.ebean.bean.EntityBean;
import io.ebeaninternal.api.SpiEbeanServer;
import io.ebeaninternal.api.SpiTransaction;
@@ -34,4 +35,17 @@ abstract class SaveManyBase {
*/
abstract void save();
void resetModifyState() {
if (value instanceof BeanCollection<?>) {
modifyListenReset((BeanCollection<?>) value);
}
}
void modifyListenReset(BeanCollection<?> c) {
if (insertedParent) {
// after insert set the modify listening mode for private owned etc
c.setModifyListening(many.getModifyListenMode());
}
c.modifyReset();
}
}