Skip to content

Case When enum: Could not determine ValueMapping for SqmParameter #3755

@giugallo

Description

@giugallo

I have a query extracting an enum with a CaseBuilder, but when the query is executed, hibernate throws the following error:
Caused by: org.hibernate.query.sqm.sql.ConversionException: Could not determine ValueMapping for SqmParameter: SqmPositionalParameter(3)

The enum field I try to extract is:

...
Expressions.cases()
                  .when(qRA.code.eq(codeValue))
                  .then(RelationEnum.INF)
                  .otherwise(RelationEnum.SUP),
...

I'm using querydsl 5.0.0

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