AssertionError error in BaseSqmToSqlAstConverter using SubQuery

Description

See for the backstory.

With this initial code:

 

An assertion error was thrown for: assert actualModelPart instanceof BasicValuedModelPart;

Stack:

Activity

Show:

Christian Beikov August 4, 2022 at 10:04 AM

IMO we should probably throw a better error message in this case, as I don’t think it is sensible to use any column from a SqmDerivedRoot by default. We should definitely test some scenarios where a derived root is translated to ensure we have all cases covered. Maybe it’s also worth adding some additional checks to some methods in HibernateCriteriaBuilder that error out early when passing in a derived root.

Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created August 4, 2022 at 9:41 AM
Updated March 27, 2024 at 3:58 PM
Resolved June 22, 2023 at 9:45 AM