I have a scenario in which i have: A parent class Parent which has some simple properties (int, String, etc) and 2 set of children. Set childrenA; Set childrenB;
Could i make a save function for parent simpleSave(Parent p) that will save/persists only the parent properties in the database and have a function saveWithCascade(Parent p) that will cascade to its children ?
later edit: by Save i actually mean Update. Because if i know that only a property or a set changed, i dont want hibernate to do lots of selects on the others just to check if they changed