NPE in FromClause#findTableGroup

Description

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 a null parent. The condition in FromClause#findTableGroup doesn't handle the fact that NavigablePath#getParent can return null.

if ( tg instanceof OneToManyTableGroup && navigablePath.getParent().equals( tg.getNavigablePath() ) ) {

Activity

Show:
Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

Created January 23, 2024 at 5:41 PM
Updated January 24, 2024 at 11:44 AM
Resolved January 24, 2024 at 9:53 AM