Postgresql – How can I use an SQL 'in' clause with potentially empty list parameter in Java JPA?
I have a JPA repository interface with the following method: @Modifying @Query(value = "DELETE FROM bivrip.bloop_options o WHERE o.bloop_id = ?1 AND o.id not in ?2", nativeQuery = true) public void removeOtherOptions(int bloopID, List<Integer> validOptionIDs); When the validOptionIDs contains at…