this.em.createQuery("UPDATE ModelA a set a.parameter1 = ?1 " +
"where a.modelB = (from ModelB b where b.parameter2 = ?2)")
.setParameter(1, "parameter1")
.setParameter(2,"parameter2")
.executeUpdate();