fixing jpql for boolean
adding test