Couldn't determine JDBCType for class + Spring data jdbc

Viewed 126
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

1 Answers

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.

Related