'Couldn't determine JDBCType for class + Spring data jdbc
long countActionByStateIn(ActionState[] states); // works
// throws Couldn't determine JDBCType for class com.example.ActionEnum
@Query("Select * from action WHERE (COALESCE(:states, NULL) IS NULL OR state IN (:states))")
public List<Action> getActionByType(ActionEnum[] types)
public List<Action> getActionByType(List<String> types) // works
I am confused why custom query throwing error ? I also trying adding jdbc convertors for ActionEnum but it didn't work ?
mean while if i change ActionEnum[] to String [] it works
Solution 1:[1]
This seems to be an instance of a known bug. We even have a PR for it, so chances are it will get fixed in one of the upcoming versions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jens Schauder |