Skip to content

Commit 0d84eb7

Browse files
committed
Merge pull request hibernate#9 from dreab8/HHH_10664_tuplizerdynamicentitytest
Fix for TuplizerDynamicEntityTest and ImprovedTuplizerDynamicEntityTest
2 parents 0035edc + f5a2d57 commit 0d84eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ public boolean contains(Object object) {
18871887
checkOpen();
18881888
// checkTransactionSynchStatus();
18891889

1890-
if ( object != null && !HibernateProxy.class.isInstance( object ) ) {
1890+
if ( object != null && !HibernateProxy.class.isInstance( object ) && persistenceContext.getEntry( object ) == null ) {
18911891
// check if it is an entity -> if not throw an exception (per JPA)
18921892
try {
18931893
getSessionFactory().getMetamodel().entityPersister( object.getClass() );

0 commit comments

Comments
 (0)