-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum type in Query annotation does not work in in clause #1212
Labels
type: bug
A general bug
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
Apr 2, 2022
mp911de
added
type: bug
A general bug
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
Apr 4, 2022
Seems related to #630 |
I also found that issue, but the problem is different. This problem occurs in the I now use a compromise, which adds a default method. This default method calls the method of the @Query("select category, text, count(id) as count" +
" from table_name" +
" where from_type in (:fromTypes)" +
" group by text, category")
List< Stats > statsByFromTypeString(Collection<String> fromTypes);
default List<Stats> statsByFromType(Collection<PaperFromType> fromTypes) {
return statsByCategoriesString(fromTypes.stream().map(PaperFromType::name).collect(Collectors.toList()));
} But it's rather awkward to use. Can this collection parameter problem be solved? |
This was referenced Jul 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
FromType
here is anenum
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 actualstring
type is stored in the databaseThe text was updated successfully, but these errors were encountered: