HHH-15045 + HHH-15235 onFlushDirty() invoked on parent entity in a @OneToOne relationship when no table columns are changed - PropertyAccessException on merging Bidirectional OneToOne with EmbeddedId - Reverted HHH-14216
This commit is contained in:
parent
249dfd0d12
commit
a08716b67b
|
@ -142,7 +142,7 @@ public class OneToOneType extends EntityType {
|
||||||
@Override
|
@Override
|
||||||
public Object assemble(Serializable oid, SharedSessionContractImplementor session, Object owner) throws HibernateException {
|
public Object assemble(Serializable oid, SharedSessionContractImplementor session, Object owner) throws HibernateException {
|
||||||
//this should be a call to resolve(), not resolveIdentifier(),
|
//this should be a call to resolve(), not resolveIdentifier(),
|
||||||
//'cos it might be a property-ref, and we did not cache the
|
//because it might be a property-ref, and we did not cache the
|
||||||
//referenced value
|
//referenced value
|
||||||
return resolve( session.getContextEntityIdentifier(owner), session, owner );
|
return resolve( session.getContextEntityIdentifier(owner), session, owner );
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ public class EmbeddedIdTest {
|
||||||
foo.bar = bar;
|
foo.bar = bar;
|
||||||
bar.foo = foo;
|
bar.foo = foo;
|
||||||
session.merge( foo );
|
session.merge( foo );
|
||||||
session.flush();
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,6 @@ public class DirtyFlushTest {
|
||||||
user.profile = profile;
|
user.profile = profile;
|
||||||
|
|
||||||
em.persist( profile );
|
em.persist( profile );
|
||||||
em.flush();
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
scope.inTransaction( em -> {
|
scope.inTransaction( em -> {
|
||||||
|
|
Loading…
Reference in New Issue