HHH-11182 - HQL subquery with constraint property in superclass does not join superclass table

(cherry picked from commit b3151de647)
This commit is contained in:
Andrea Boriero 2016-10-19 22:56:52 +01:00 committed by Gail Badner
parent b7d0501fcb
commit 5c89fb1dad
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,9 @@ public class JoinProcessor implements SqlTokenTypes {
}
// If there is a FROM fragment and the FROM element is an explicit, then add the from part.
if ( fromElement.useFromFragment() /*&& StringHelper.isNotEmpty( frag )*/ ) {
if ( fromElement.useFromFragment() ||
( fromElement.getFromClause().isSubQuery()
&& fromElement.isDereferencedBySuperclassOrSubclassProperty() ) /*&& StringHelper.isNotEmpty( frag )*/ ) {
String fromFragment = processFromFragment( frag, join ).trim();
LOG.debugf( "Using FROM fragment [%s]", fromFragment );
processDynamicFilterParameters(