HHH-11881 : Null Set collection elements are inserted into collection table
This commit is contained in:
parent
240492f940
commit
3553efa05f
|
@ -384,7 +384,7 @@ public class PersistentSet extends AbstractPersistentCollection implements java.
|
|||
// note that it might be better to iterate the snapshot but this is safe,
|
||||
// assuming the user implements equals() properly, as required by the Set
|
||||
// contract!
|
||||
return oldValue == null || elemType.isDirty( oldValue, entry, getSession() );
|
||||
return ( oldValue == null && entry != null ) || elemType.isDirty( oldValue, entry, getSession() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -434,7 +434,7 @@ public class PersistentSet extends AbstractPersistentCollection implements java.
|
|||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean entryExists(Object key, int i) {
|
||||
return true;
|
||||
return key != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue