Improve entity.changed(), it now checks for attachment and inited.

This commit is contained in:
Olof Larsson 2013-04-25 08:34:59 +02:00
parent 18bb47007e
commit 1a3f153a08

View File

@ -60,7 +60,12 @@ public abstract class Entity<E extends Entity<E>> implements Comparable<E>
String id = this.getId(); String id = this.getId();
if (id == null) return; if (id == null) return;
this.getColl().changedIds.add(id); Coll<E> coll = this.getColl();
if (coll == null) return;
if (!coll.inited()) return;
coll.changedIds.add(id);
} }
public ModificationState sync() public ModificationState sync()