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