Recently my team upgraded from Hibernate 3 to Hibernate 5 so I am working on the migration stuff. Now when I try to use CriteriaQuery class, eclipse shows that it can be imported from both 'javax.persistence.criteria' as well as 'org.hibernate.criterion' packages.
CriteriaQuery cq = getSession().getCriteriaBuilder().createQuery(MyClass.class);
So I am a bit confused over here about which one to use.
Also it would be very helpful if someone could explain the difference between the two(JPA and Hibernate) as I am unclear about this conceptually and have a hard time getting to know whats happening underneath.