diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java index e474b6bad8f9..b2dd3d6b4d4a 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java @@ -23,7 +23,6 @@ import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.pretty.MessageHelper; import org.hibernate.type.CollectionType; - import org.jboss.logging.Logger; /** @@ -184,9 +183,12 @@ public static void processReachableCollection( // who set up circular or shared references between/to collections. if ( ce.isReached() ) { // We've been here before - throw new HibernateException( - "Found shared references to a collection: " + type.getRole() - ); + + // Alfa change - ignore shared collections, these are deliberate and there will be no changes within them. + return; +// throw new HibernateException( +// "Found shared references to a collection: " + type.getRole() +// ); } ce.setReached( true ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java index 97fac7f3ab61..ec8645adfef5 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java @@ -14,8 +14,9 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Properties; import java.util.Objects; +import java.util.Properties; + import javax.persistence.AttributeConverter; import org.hibernate.FetchMode; @@ -515,7 +516,7 @@ public Type getType() throws MappingException { throw new MappingException( msg ); } - return type = result; + return result; } @Override