()
が欠落しているだけです
@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)
間に違いがあります
a && b && c || d
および
a && b && (c || d)