Criteria with jpamodelgen works