I have the following hibernate query
findByUserOrReaderAndIdInAndStatusNotIn
the actual query generated is
WHERE user=? OR reader=? AND (id in (?, ?)) AND (status not in (?, ?))
but what I actually need is
WHERE (user=? OR reader=?) AND (id in (?, ?)) AND (status not in (?, ?))
How to properly create the findBy method? I cannot use @Query cause this method is generic.