Check for entity attachment rather than entity having an id
This commit is contained in:
parent
3ae6bee6e5
commit
9c0d9afe19
@ -269,8 +269,7 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
||||
{
|
||||
// Check entity
|
||||
if (entity == null) return null;
|
||||
String previousEntityId = entity.getId();
|
||||
if (previousEntityId != null) return previousEntityId;
|
||||
if (entity.attached()) return entity.getId();
|
||||
|
||||
String id;
|
||||
// Check/Fix id
|
||||
|
Loading…
Reference in New Issue
Block a user