HHH-9597 : Criteria creates invalid column aliases

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

View File

@ -1112,7 +1112,11 @@ public class JoinWalker {
buf.append(", ").append(selectFragment); buf.append(", ").append(selectFragment);
} }
if ( joinable.consumesEntityAlias() ) entityAliasCount++; 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(); return buf.toString();
} }