Minor DB changes
This commit is contained in:
parent
d0b9af0324
commit
17321f7249
@ -344,7 +344,6 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
|||||||
|
|
||||||
// Then attach!
|
// Then attach!
|
||||||
this.attach(entity, id, false);
|
this.attach(entity, id, false);
|
||||||
|
|
||||||
// On creation it might be modified by addition or removal of new/old fields.
|
// On creation it might be modified by addition or removal of new/old fields.
|
||||||
// So we must do a check for that.
|
// So we must do a check for that.
|
||||||
// this.putIdentifiedModificationFixed(id, Modification.UNKNOWN);
|
// this.putIdentifiedModificationFixed(id, Modification.UNKNOWN);
|
||||||
|
@ -244,8 +244,8 @@ public abstract class EntityContainerAbstract<E extends EntityInternal<E>> imple
|
|||||||
protected synchronized String attach(E entity, Object oid, boolean noteModification)
|
protected synchronized String attach(E entity, Object oid, boolean noteModification)
|
||||||
{
|
{
|
||||||
// Check entity
|
// Check entity
|
||||||
if (entity == null) return null;
|
if (entity == null) throw new NullPointerException("entity");
|
||||||
if (entity.attached()) return entity.getId();
|
if (entity.attached()) throw new IllegalArgumentException("already attached");
|
||||||
|
|
||||||
String id;
|
String id;
|
||||||
// Check/Fix id
|
// Check/Fix id
|
||||||
@ -269,7 +269,6 @@ public abstract class EntityContainerAbstract<E extends EntityInternal<E>> imple
|
|||||||
|
|
||||||
// Attach
|
// Attach
|
||||||
this.getIdToEntityRaw().put(id, entity);
|
this.getIdToEntityRaw().put(id, entity);
|
||||||
|
|
||||||
// Identify Modification
|
// Identify Modification
|
||||||
if (noteModification)
|
if (noteModification)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user