DML « Update « JPA Q&A





2. DML-style update problem    forum.hibernate.org

Hi! At parent/children pattern, parent know children, but child don't know parent. I want to update a parent's children. I wrote below DML-style update statement: update children c set c.name='test' where c.id in (select c.id from parent p join p.children c where p.name='parent'); It was translated as below mysql statement: update children set name='test' where id in (select c.id from parent ...

4. dml-style update    forum.hibernate.org

String update = "update permission set permissionFlag = :v1 , source = :dsd where person.costumer_number = :v3"; Query q = this.getSession().createQuery(update); q.setInteger("v1", permissionPostFlag); q.setString("v3", costumerNumber); q.setParameter("dsd", dsd); ...