There is a need to update one field to the same value in a heap of records. Using the DAO/ORM structure, I would retrieve each parent object, loop through each child object, update it s field, and then save it.
It would be faster to just write the SQL: update table set field = value where criteria = specified.
How do I fit these things together? Do I just stick with the dao structure:
for (Table t : getTableDao().getTables()){
for(Child c : t.getChildren()){
c.setValue(1);
getChildrenDao().save(c);
}
}
Cheers.