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 44bbc2ba8a
commit a8c6790d72
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(