Hi,
 
I've been able to store a set of objects which have relationships among them stored all at once using the code "db.create(rs)".  "rs" is the object in code that I am to persist to the DB.
 
So the object "rs" has a collection of objects of type B and they each have a collection of objects of type C I want to be able to delete the row in the db corresponding to the instance of RS as well as the rows in table B that contain an db version of a B that is contained by the object RS and I want to remove the rows in table C that contain an db version of a C that is contained by the object B.
 
I've been searching the Castor API and found the remove() method but it seems to just remove the instance of RS and all the instance (rows) of B that have a FK that is equal to the PK of the instance of rs I am trying to delete. I would find it strange if I would have to set up a cascade delete to do this instead of doing it all in one shot just like I did with the create() method call.
 
Thanks in advance for any help. 
 
-George
 
 

Reply via email to