Hi!
Does anyone know where in hibernate is the cascading implemented ?
I look for the part that determines the order of saving of entities, when save() is called for an entity that has associated other entities and cascading is "all".
Example:
Code:
House h;
Address a;
Person p;
a.setHouse(h);
p.setHome(a);
h.getAddresses().add(a);
a.getPeople().add(p);
session.save(a); // saves : h, then a and lastly p
session.close();
So what I need is the code, that gives "a" deterines that "h" is associated and it must be saved before, and also "p" that must be saved after (as it references "a").
Regards,
David