Minor DB changes

This commit is contained in:
Magnus Ulf 2019-02-17 11:10:12 +01:00
parent d0b9af0324
commit 17321f7249
2 changed files with 3 additions and 5 deletions

View File

@ -344,7 +344,6 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
// Then attach!
this.attach(entity, id, false);
// On creation it might be modified by addition or removal of new/old fields.
// So we must do a check for that.
// this.putIdentifiedModificationFixed(id, Modification.UNKNOWN);

View File

@ -244,8 +244,8 @@ public abstract class EntityContainerAbstract<E extends EntityInternal<E>> imple
protected synchronized String attach(E entity, Object oid, boolean noteModification)
{
// Check entity
if (entity == null) return null;
if (entity.attached()) return entity.getId();
if (entity == null) throw new NullPointerException("entity");
if (entity.attached()) throw new IllegalArgumentException("already attached");
String id;
// Check/Fix id
@ -259,7 +259,7 @@ public abstract class EntityContainerAbstract<E extends EntityInternal<E>> imple
if (id == null) return null;
if (this.getIdToEntity().containsKey(id)) return null;
}
// PRE
this.preAttach(entity, id);
@ -269,7 +269,6 @@ public abstract class EntityContainerAbstract<E extends EntityInternal<E>> imple
// Attach
this.getIdToEntityRaw().put(id, entity);
// Identify Modification
if (noteModification)
{