Guest User

Untitled

a guest
May 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. // Defaults:
  2. Db4o.configure().activationDepth(5);
  3. Db4o.configure().updateDepth(1);
  4. Db4o.configure().objectClass(Person.class).cascadeOnActivate(false);
  5. Db4o.configure().objectClass(Person.class).cascadeOnDelete(false);
  6. Db4o.configure().objectClass(Person.class).cascadeOnUpdate(false);
  7.  
  8. // Vollständig manuelle Aktivierung mit Bug:
  9. Db4o.configure().activationDepth(0);
  10. ...
  11. Person p = (Person)q.execute().next();
  12. db.activate(p, 1);
  13. p.mother.age++;
  14. db.store(p.mother);
  15. db.deactivate(p, 1);
Add Comment
Please, Sign In to add comment