HHH-9375 - bugfix suggestion
This commit is contained in:
parent
8acf6f706f
commit
cf7f020a1b
|
@ -22,6 +22,7 @@ import org.hibernate.hql.internal.ast.HqlSqlWalker;
|
||||||
import org.hibernate.hql.internal.ast.tree.FromClause;
|
import org.hibernate.hql.internal.ast.tree.FromClause;
|
||||||
import org.hibernate.hql.internal.ast.tree.FromElement;
|
import org.hibernate.hql.internal.ast.tree.FromElement;
|
||||||
import org.hibernate.hql.internal.ast.tree.FromElementFactory;
|
import org.hibernate.hql.internal.ast.tree.FromElementFactory;
|
||||||
|
import org.hibernate.hql.internal.ast.tree.ImpliedFromElement;
|
||||||
import org.hibernate.persister.collection.QueryableCollection;
|
import org.hibernate.persister.collection.QueryableCollection;
|
||||||
import org.hibernate.sql.JoinType;
|
import org.hibernate.sql.JoinType;
|
||||||
import org.hibernate.type.CollectionType;
|
import org.hibernate.type.CollectionType;
|
||||||
|
@ -47,7 +48,7 @@ public class EntityGraphQueryHint {
|
||||||
Map<String, FromElement> explicitFetches = new HashMap<String, FromElement>();
|
Map<String, FromElement> explicitFetches = new HashMap<String, FromElement>();
|
||||||
for ( Object o : fromClause.getFromElements() ) {
|
for ( Object o : fromClause.getFromElements() ) {
|
||||||
final FromElement fromElement = (FromElement) o;
|
final FromElement fromElement = (FromElement) o;
|
||||||
if ( fromElement.getRole() != null ) {
|
if ( fromElement.getRole() != null && ! (fromElement instanceof ImpliedFromElement) ) {
|
||||||
explicitFetches.put( fromElement.getRole(), fromElement );
|
explicitFetches.put( fromElement.getRole(), fromElement );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue