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 9526944 commit f5a2d57Copy full SHA for f5a2d57
hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java
@@ -1889,7 +1889,7 @@ public boolean contains(Object object) {
1889
checkOpen();
1890
// checkTransactionSynchStatus();
1891
1892
- if ( object != null && !HibernateProxy.class.isInstance( object ) ) {
+ if ( object != null && !HibernateProxy.class.isInstance( object ) && persistenceContext.getEntry( object ) == null ) {
1893
// check if it is an entity -> if not throw an exception (per JPA)
1894
try {
1895
getSessionFactory().getMetamodel().entityPersister( object.getClass() );
0 commit comments