Skip to content

Enum type in Query annotation does not work in in clause #1212

Closed
@holmofy

Description

@holmofy
@Query("select category, text, count(id) as count" +
        " from table_name" +
        " where from_type in (:fromTypes)" +
        " group by text, category")
List<Stats> statsByFromType(Collection<FromType> fromTypes);

The FromType here is an enum type, but the in clause in the Query annotation cannot find the data.

The executed sql shows that FromType is converted to int type, but the actual string type is stored in the database

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions