I got an enum (ClubRole) which got a method returning a collection of values from this enum. I trying to call this method from inside the query using SpEl.
@Query("select m from ClubMember m " +
"where m.student = :student " +
"and m.role in :#{#role.getParents()}"
)
List<ClubMember> findByRoleWithInheritance(@Param("student") Student student, @Param("role") ClubRole role);
This passes the build, and the application runs but when this method's called I got ``No parameter binding found for name role!; nested exception is java.lang.IllegalArgumentException: No parameter binding found for name role!
I tried different ways but none worked. I would like to know if it's possible to use SpEl in this situation, and if so how ?