首先,
experienceInMonths从更改
String为
int(否则您无法将字符串与数字进行比较)。然后,您可以尝试使用此“香肠”:
List<Person> findByQualifications_experienceInMonthsGreaterThanAndQualifications_experienceInMonthsLessThanAndName(int experienceGreater, int experienceLess, String name);
或者,您可以尝试使用这种非常不错的方法:
@Query("select p from Person p left join p.qualifications q where q.experienceInMonths > ?1 and q.experienceInMonths < ?2 and q.name = ?3")List<Person> findByQualification(int experienceGreater, int experienceLess, String name);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)