We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eae372 commit ba88d7cCopy full SHA for ba88d7c
hibernate-core/src/main/java/org/hibernate/type/CollectionType.java
@@ -638,6 +638,14 @@ public Object replace(
638
final Object owner,
639
final Map<Object, Object> copyCache) throws HibernateException {
640
if ( original == null ) {
641
+ if ( target == null ) {
642
+ return null;
643
+ }
644
+ if ( target instanceof PersistentCollection ) {
645
+ final Collection collection = (Collection) target;
646
+ collection.clear();
647
+ return collection;
648
649
return null;
650
}
651
if ( !Hibernate.isInitialized( original ) ) {
0 commit comments