il vous manque simplement ()
@Query(value = "SELECT * FROM connections WHERE other_user_id=?1 and acceptance=0 and (name like %?2% "
+ " or designation like %?2% "
+ " or entity like %?2% "
+ " or location like %?2%"
+ " or contact1 like %?2%"
+ " or contact2 like %?2%"
+ " or icsnid like %?2%"
+ " or email like %?2%)",nativeQuery = true)
il y a une différence entre
a && b && c || d
et
a && b && (c || d)