Skip to content

Commit f5a2d57

Browse files
committed
Fix for TuplizerDynamicEntityTest and ImprovedTuplizerDynamicEntityTest
1 parent 9526944 commit f5a2d57

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
@@ -1889,7 +1889,7 @@ public boolean contains(Object object) {
18891889
checkOpen();
18901890
// checkTransactionSynchStatus();
18911891

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

0 commit comments

Comments
 (0)