Reputation: 31
Since Hibernate 5 no longer supports createCriteria, I cannot figure out how to replace the old session.createCriteria(className.class).add(Restrictions.idEq(id)).list();
idEq() part with CriteriaBuilder. CriteriaBuilder equal method works only if I have attribute name. What I need is query by identifier.
Any ideas?
Upvotes: 0
Views: 402