I am trying to determine how cascading works. If I set cascade="all" on a particular Parent/Child one-to-one (modelled as many-one foreign key type ) relationship, then if I pass the Parent to session.save(), then does that pass the child also to session.save()?
If that is the case, is it true even if the child has already been saved in a previous session separately (and hence has a valid id value)? Does session.save(parent) still result in a session.save( child ) ?
So basically the question is does session.save( object ) always result in a CREATE query for that object and also all children in its entire object graph? This question assumes, cascade="all" is set on the parent/child relationship.
Thanks
Rama
|