Fix Bug [ 1769579 ] PO.equals comparison wrong for new records
This commit is contained in:
parent
65f8e8a5e1
commit
ef333ae53f
|
@ -231,7 +231,11 @@ public abstract class PO
|
||||||
if (!(cmp instanceof PO))
|
if (!(cmp instanceof PO))
|
||||||
return false;
|
return false;
|
||||||
if (cmp.getClass().equals(this.getClass()))
|
if (cmp.getClass().equals(this.getClass()))
|
||||||
return ((PO)cmp).get_ID() == get_ID();
|
// if both ID's are zero they can't be compared by ID
|
||||||
|
if (((PO)cmp).get_ID() == 0 && get_ID() == 0)
|
||||||
|
return super.equals(cmp);
|
||||||
|
else
|
||||||
|
return ((PO)cmp).get_ID() == get_ID();
|
||||||
return super.equals(cmp);
|
return super.equals(cmp);
|
||||||
} // equals
|
} // equals
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue