Steve, The answer is "it depends".... If Services objects are defined in your database mapping as depending on the ServicePackage object (depends="ServicePackage"), then that is exactly what will happen. If not, the two are independent and then you will have to manage the lifecycle of the Services objects yourself. In either case, you only need to use the update method if you are using long transactions (and you will have to implement Timestampable on those objects). Otherwise, just loading the object, changing it, and committing will do the trick...
Hope this helps... Margaret -----Original Message----- From: Steve Earl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Update and Collections Hi, Let me give the following example: I have an object ServicePackage which contains a collection of Services objects in a file named services which is of type ArrayList. If I remove, for example, two Service objects from the services collection and then pass the service package object to the update method will Castor execute delete statements to remove the two services from the database? Really it's a question about how intelligent Castor is in it's update method. Does Castor compare the existing top level objects entire object graph with the object passed to the update method and add / remove / update objects as appropriate? Thanks in advance, Steve... ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev