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