HHH-15044 Revert HHH-14826 fix because the provided test was wrong

This commit is contained in:
Andrea Boriero 2022-01-20 11:32:34 +01:00 committed by Andrea Boriero
parent 5c331f9c31
commit 729268433e
2 changed files with 1 additions and 8 deletions

View File

@ -215,14 +215,6 @@ public class OneToOneType extends EntityType {
@Override
public Object assemble(Serializable oid, SharedSessionContractImplementor session, Object owner) throws HibernateException {
if ( oid == null ) {
if ( uniqueKeyPropertyName != null ) {
return resolve( session.getContextEntityIdentifier( owner ), session, owner );
}
return null;
}
//the owner of the association is not the owner of the id
Serializable id = ( Serializable ) getIdentifierType( session ).assemble( oid, session, null );

View File

@ -54,6 +54,7 @@ public class OneToOneCacheEnableSelectingTest extends BaseCoreFunctionalTestCase
Product product = s.find(Product.class, pid.get());
ProductConfig config = new ProductConfig();
config.setProduct(product);
product.setConfig( config );
s.persist(config);
});