hi jimmy
Not sure what your question is but can say that when
cascade is set, Hibernate will treat the linked
entities as being
value types. Basically, cascaded operations will pass on.
Firstly, all operations on instances that are associated with (in) a Session are
always persisted. So in your code, the creation of the relationship between the parent and child will be persisted immediately (not actually written immediately to the DB though). Of course, the child will not have been persisted when the call is made. Because cascade is set, Hibernate calls Session.saveOrUpdate(child) before it calls Session.saveOrUpdate(parent). If cascade wasnt set, you may get an error when the action is performed - because in a relation using a join table for example, HIbernate would try to add an entry to the collection table but it would refer to a child that didnt exist (in the DB).
http://www.hibernate.org/hib_docs/v3/re ... d-cascades
Happy hibernating
Michael