PL-8173 For identity-ID entity in composition, edit right after create yields another instance

This commit is contained in:
Konstantin Krivopustov 2016-11-09 14:09:05 +04:00
parent a8428e67cb
commit b433b0a14f

View File

@ -142,8 +142,11 @@ public class IdProxy extends Number implements Serializable {
IdProxy that = (IdProxy) other;
if (value != null)
if (value != null) {
if (that.value == null && that.entity.getDbGeneratedId() != null)
return value.equals(that.entity.getDbGeneratedId());
return value.equals(that.value);
}
if (entity.getDbGeneratedId() == null || that.entity.getDbGeneratedId() == null)
return Objects.equals(uuid, that.uuid);