diff --git a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java index e9e9ab1bb5..e3675af1c6 100644 --- a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java +++ b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java @@ -1114,7 +1114,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers current, session ); - currentIds.add( new TypedValue( idType, currentId, entityPersister.getEntityMode() ) ); + currentIds.add( new TypedValue( idType, currentId ) ); } } } @@ -1123,7 +1123,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers for ( Object old : oldElements ) { if ( !currentSaving.contains( old ) ) { Serializable oldId = ForeignKeys.getEntityIdentifierIfNotUnsaved( entityName, old, session ); - if ( !currentIds.contains( new TypedValue( idType, oldId, entityPersister.getEntityMode() ) ) ) { + if ( !currentIds.contains( new TypedValue( idType, oldId ) ) ) { res.add( old ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/criterion/Example.java b/hibernate-core/src/main/java/org/hibernate/criterion/Example.java index d35d86deb7..b67689e391 100644 --- a/hibernate-core/src/main/java/org/hibernate/criterion/Example.java +++ b/hibernate-core/src/main/java/org/hibernate/criterion/Example.java @@ -287,7 +287,7 @@ public class Example implements Criterion { if (isLikeEnabled) string = matchMode.toMatchString(string); value = string; } - list.add( new TypedValue(type, value, null) ); + list.add( new TypedValue(type, value) ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/criterion/InExpression.java b/hibernate-core/src/main/java/org/hibernate/criterion/InExpression.java index ec8e913d18..6e98b489e1 100644 --- a/hibernate-core/src/main/java/org/hibernate/criterion/InExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/criterion/InExpression.java @@ -86,13 +86,13 @@ public class InExpression implements Criterion { Object subval = values[j]==null ? null : actype.getPropertyValues( values[j], EntityMode.POJO )[i]; - list.add( new TypedValue( types[i], subval, EntityMode.POJO ) ); + list.add( new TypedValue( types[i], subval ) ); } } } else { for ( int j=0; j