-
Notifications
You must be signed in to change notification settings - Fork 358
generic enum converter dont work [DATAJDBC-566] #787
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
Comments
Jawad Ahmad commented Same issue, and it still persists in latest versions as well. I am trying to register a specific enum converter but looks like bean overriding is disabled for Spring Data JDBC Auto Configuration |
i have similar issue, try to use but doesn't work |
Hi Guys but while use enum type as query condition, it does't work, it use JdbcValue as input string and doesn't use converter |
@Ikki-Dai Thanks for the example code. I just tried it out (using 2.3.0) and it seems to work to me. It was able to read and write enums as integers in both generated queries (eg findAllByX) and custom annotated queries. Can you be more specific about where you saw the conversion failing? |
@pwinckles I was tried on H2db with unit test. it seems convert between enum with jdbcValue directly. I can't remember more details, but you can tried again with h2db. |
Yes, I was running against H2 as well. As far as I can tell, your solution works. |
I still hope to have an option to determine enum write/read as string or ordinary in framework, after that it's no need to custom and register so many enum type converters |
edwil13x opened DATAJDBC-566 and commented
i want to use a genric converter for all the enums i used in my project. but i got an error.
Explanations :
Given this enum
and this jdbcConfig
=> why my genericGenderConverter is not use at all, and spring data back to the default enum converter.
Affects: 2.0.1 (Neumann SR1)
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: