Skip to content

Join on subquery and sort by left joined column causes unknown parameter error when inline ID query is disabled #2010

@kizzywuzzit

Description

@kizzywuzzit

The scenario required to hit this is definitely a bit weird, but I just happened to need weird. When a query joins on a windowed CTE, AND sorts by a coalesced left joined column, it produces

java.lang.IllegalArgumentException: Invalid or unknown parameter with name: ids_0_0

This stems from the fact that the ids_# parameters are never registered in the parameter manager, so when getObjectQueryById gets called it creates the query with only the param_# parameters registered. When PaginatedTypedQueryImpl iterates and calls setParameter the underlying AbstractCustomQuery doesn't have it in the parameter list, and throws the exception.

PR: #2011

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions