Hibernate version:2.1.6
Name and version of the database you are using:postgresql 7.2
Hi everybody,
Suppose I have two classes (A and B) and I am using a many-to-one unidirectional association from B to A (B has a foreign-key to A). How will changes in class A objects be cascaded to associated class B objects?
Does cascade="delete" mean that when an Object from class A is deleted, all associated objects from class B will be deleted?
Does cascade="save-update" mean that when an Object from class A is saved or updated, all associated objects from class B will be saved or updated?
Will the changes in object A be cascaded to associated objects from class B even if the class B objects are not loaded in the current session? In other words, will hibernate load the associated class B objects to cascade the changes?
I've searched in your forum and in the Hibernate in Action book but I could not find an answer for this. Please, help me.
Thanks,
Jair Jr
|