Thank you for your hint. I was looking for something like: String hqlInsert = "insert into DelinquentAccount (id, name) select c.id, c.name from Customer c where ..."; int createdEntities = s.createQuery( hqlInsert ) .executeUpdate();
It seems that HQL has some way of dealing with insert ..select and i was hoping for something similar in Criteria API for performance reasons. Is there a match in Criteria for that kind of operation? A patch, a workaround, something? Also i don't return from my select a mapped entity, but rather projections based items. How can i deal with them?
Thanks again,
|