From: Soh Dubom Date: 2009-08-12T20:19:12+09:00 Subject: Re: Destroying related objects doubt ... basic oop question Actually after some research I figured out that: 1. The rules set for the particular app will say if the relationship is Composition, Aggregation or etc 2. Since i decided that it's a Composition, so when I delete House, its Rooms should also be deleted, and the deletion/destroying is regarding to the database record, not the object instance because the object instance will be vanished anyways after the script is executed.(in composition, aggregation, association, etc) Although we deal with object instances, Object Relationships are related to what happens to the records in the database for a particular operation, eg deleting the parent object/model. The instances will, sooner or later, be vanished, but the database records will or will not depending on the relationship. @ '7stud' : setting NIL to an object doesn't delete it, nor destroy it. I remember that in PHP I can unset(obj) that is different from NIL or NULL, but even though I'm not sure it will force GC -- Posted via http://www.ruby-forum.com/.