Fix Bug [ 1769579 ] PO.equals comparison wrong for new records
This commit is contained in:
parent
65f8e8a5e1
commit
ef333ae53f
|
@ -231,6 +231,10 @@ public abstract class PO
|
|||
if (!(cmp instanceof PO))
|
||||
return false;
|
||||
if (cmp.getClass().equals(this.getClass()))
|
||||
// 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);
|
||||
} // equals
|
||||
|
|
Loading…
Reference in New Issue