HHH-10891 Support @Any in @Embedded
(cherry picked from commit 64179673a3
)
This commit is contained in:
parent
e20d66ad49
commit
56f67fb0cd
|
@ -92,7 +92,6 @@ public abstract class AbstractCompositionAttribute
|
|||
// we build the association-key here because of the "goofiness" with 'currentColumnPosition'
|
||||
final AssociationKey associationKey;
|
||||
final AssociationType aType = (AssociationType) type;
|
||||
final Joinable joinable = aType.getAssociatedJoinable( sessionFactory() );
|
||||
|
||||
if ( aType.isAnyType() ) {
|
||||
associationKey = new AssociationKey(
|
||||
|
@ -111,6 +110,8 @@ public abstract class AbstractCompositionAttribute
|
|||
);
|
||||
}
|
||||
else if ( aType.getForeignKeyDirection() == ForeignKeyDirection.FROM_PARENT ) {
|
||||
final Joinable joinable = aType.getAssociatedJoinable( sessionFactory() );
|
||||
|
||||
final String lhsTableName;
|
||||
final String[] lhsColumnNames;
|
||||
|
||||
|
@ -133,6 +134,8 @@ public abstract class AbstractCompositionAttribute
|
|||
associationKey = new AssociationKey( lhsTableName, lhsColumnNames );
|
||||
}
|
||||
else {
|
||||
final Joinable joinable = aType.getAssociatedJoinable( sessionFactory() );
|
||||
|
||||
associationKey = new AssociationKey(
|
||||
joinable.getTableName(),
|
||||
getRHSColumnNames( aType, sessionFactory() )
|
||||
|
|
Loading…
Reference in New Issue