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
|
// Check entity
|
||||||
if (entity == null) return null;
|
if (entity == null) return null;
|
||||||
String previousEntityId = entity.getId();
|
if (entity.attached()) return entity.getId();
|
||||||
if (previousEntityId != null) return previousEntityId;
|
|
||||||
|
|
||||||
String id;
|
String id;
|
||||||
// Check/Fix id
|
// Check/Fix id
|
||||||
|
Loading…
Reference in New Issue
Block a user