HHH-9597 : Criteria creates invalid column aliases

This commit is contained in:
Gail Badner 2015-02-12 13:38:09 -08:00
parent c9df7589f2
commit 36cc2c836c
1 changed files with 5 additions and 1 deletions

View File

@ -1112,7 +1112,11 @@ public class JoinWalker {
buf.append(", ").append(selectFragment);
}
if ( joinable.consumesEntityAlias() ) entityAliasCount++;
if ( joinable.consumesCollectionAlias() && join.getJoinType()==JoinType.LEFT_OUTER_JOIN ) collectionAliasCount++;
if ( joinable.consumesCollectionAlias() &&
join.getJoinType()==JoinType.LEFT_OUTER_JOIN &&
!join.hasRestriction() ) {
collectionAliasCount++;
}
}
return buf.toString();
}