HHH-17049 Bytecode Enhancement, extra records created for associations created in constructor
(cherry picked from commit e98fccfdae
)
This commit is contained in:
parent
e134c0aadc
commit
ef060205c0
|
@ -147,6 +147,13 @@ public abstract class AbstractFlushingEventListener implements JpaBootstrapSensi
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean flushable(EntityEntry entry) {
|
||||
final Status status = entry.getStatus();
|
||||
return ( status == Status.MANAGED && entry.getLoadedState() != null )
|
||||
|| status == Status.SAVING
|
||||
|| status == Status.READ_ONLY;
|
||||
}
|
||||
|
||||
private void cascadeOnFlush(EventSource session, EntityPersister persister, Object object, PersistContext anything)
|
||||
throws HibernateException {
|
||||
final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
|
||||
|
|
|
@ -9,6 +9,7 @@ package org.hibernate.sql.results.graph.entity.internal;
|
|||
import org.hibernate.engine.spi.EntityUniqueKey;
|
||||
import org.hibernate.engine.spi.PersistenceContext;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.internal.log.LoggingHelper;
|
||||
import org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping;
|
||||
import org.hibernate.persister.entity.EntityPersister;
|
||||
import org.hibernate.spi.NavigablePath;
|
||||
|
@ -111,4 +112,9 @@ public class EntitySelectFetchByUniqueKeyInitializer extends EntitySelectFetchIn
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EntitySelectFetchByUniqueKeyInitializer(" + LoggingHelper.toLoggableString( getNavigablePath() ) + ")";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue