Hi all,
Considering Hibernate 3,
I have a parent table, and a child table, linked by a foreign key. I declare a many-to-one association into parent hbm file with a cascade all property. I first persit a parent (save or persist) and it saves a parent and a child. Fine so far. But in another session, i create a new parent object (functionnaly different than the one of the first session) and i make a reference to a new child object (but which is functionnaly the SAME than the one of the first session, and it is a Transient object at this point)
I would like to know if Hibernate may natively support and identify that i am managing the same child (and so do not try to persist it when i save the new parent) or do i have to develop a roundtrip to database and check if the child is already present?
Thanks all