Destroying related objects doubt
::Destroying related objects doubt
One thing that is confusing me is regarding the lifecycle of the associated objects and the related data in the database. Suppose we have an example of object composition and in this case if I destroy de parent object then the children objects will be destroyed too.
Well, the confusion I'm doing is related to the semantics of the word 'destroy'. In my understanding when I say 'destroy' an object, it means I will unset it, but I will not 'delete' the related data in the database.
ex.: let's say we have objects House and Rooms, the relationship between them is composition, so House is responsible for creating new Rooms. If I destroy the instance of House, all instances of Rooms will be destroyed as well, but it doesn't mean I have to 'delete' them from the database, right? ... sounds like a silly question, but ...
thanks in advance, sohdubom
|All times are GMT. The time now is 05:51 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0