Guest User

Untitled

a guest
May 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 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:
  9.  
  10. Db4o.configure().activationDepth(0);
  11. ...
  12. Person p = (Person)q.execute().next();
  13. db.activate(p, 1);
  14. p.mother.mother.doStuff() // NullPointerException!
  15. db.deactivate(p, 1);
Add Comment
Please, Sign In to add comment