// element join (that's how the joins are built as of now..)
//
// todo : remove this assumption ^^; maybe we make CollectionQuerySpace "special" and rather than have it
// hold a list of joins, we have it expose the 2 (index, element) separately.
Join collectionElementJoin = null;
for ( Join collectionJoin : rightHandSide.getJoins() ) {
collectionElementJoin = collectionJoin;
}
if ( collectionElementJoin == null ) {
throw new IllegalStateException(
String.format(
"Could not locate collection element join within collection join [%s : %s]",
rightHandSide.getUid(),
rightHandSide.getCollectionPersister()
)
);
}
aliasResolutionContext.registerQuerySpaceAliases(
collectionElementJoin.getRightHandSide().getUid(),
new EntityReferenceAliasesImpl(
aliases.getElementTableAlias(),
aliases.getEntityElementColumnAliases()
)
);