adding criteria with entityManager