Sleep 4.3.4 Use Criteria Update

I need an example of creating CriteriaUpdateusing Hibernate 4.3.2on the Internet, not many examples.

I need something like

private void updateStudent(final Student studentToUpdate)
{       
    final CriteriaBuilder builder = ..............
    final CriteriaUpdate<Student>update = builder.createCriteriaUpdate(Student.class);
}

I use regular Hibernate SessionFactory, my question is: how can I get the method createCriteriaUpdate, how do I get CriteriaBuilder, I saw examples created from EntityManager, but we use regularorg.hibernate.Session

any help is much appreciated.

+4
source share

Source: https://habr.com/ru/post/1531032/


All Articles