I have defined this method
@Query("select cs from CenterStudy cs where cs.id in (?1)")
@EntityGraph(value = "centerStudyAndNotifiedUsers", type = EntityGraph.EntityGraphType.LOAD)
List<CenterStudy> findAllByIdsWithCenterAndUsers(List<Long> ids);
The list with the ids is not null, nor empty, but I always get the following exception:
java.lang.NullPointerException
at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:613)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1900)
I'm pretty sure it has something to do with the way the IN clause it's defined.
Any suggestions are well welcomed!