Entity class:
Repository methods with HQL:
Calling humanEntityRepository.findByGender(listOf(Gender.MALE, Gender.FEMALE)) produces
Calling humanEntityRepository.findByNames(listOf("Alice", "Bob")) produces
Swapping the order of nullability check to select he from HumanEntity he where he.name in :names or :names is null and calling {{humanEntityRepository.findByNames(listOf("Alice", "Bob"))}}results in
humanEntityRepository.findByNames(emptyList()) results in
But querying same HQL with list of single element works fine. |