The scenario is, selecting an entity with a subselect fetchable association and having a join for a one-to-many association prior to that from clause element in the query e.g.
where B has a subselect fetchable association.
This triggers the mentioned NPE because the navigable path for which to find the table group is B, which has a null parent. The condition in FromClause#findTableGroup doesn't handle the fact that NavigablePath#getParent can return null.
An NPE is thrown in a very particular scenario:
The scenario is, selecting an entity with a subselect fetchable association and having a join for a one-to-many association prior to that from clause element in the query e.g.
where
B
has a subselect fetchable association.This triggers the mentioned NPE because the navigable path for which to find the table group is
B
, which has anull
parent. The condition inFromClause#findTableGroup
doesn't handle the fact thatNavigablePath#getParent
can return null.if ( tg instanceof OneToManyTableGroup && navigablePath.getParent().equals( tg.getNavigablePath() ) ) {