9 Aug 2006 00:12
Re: Re: Dependency
Manuel Lemos <mlemos <at> acm.org>
2006-08-08 22:12:22 GMT
2006-08-08 22:12:22 GMT
Hello, Sorry for the delay. on 07/17/2006 02:18 PM comfortablementeadormecido said the following: > Yes the references are nullified indeed, but I ment a cascading > removal of elements that are dependant of the existance of a certain > object. > Using the same example as before: If each State has a Collection of > Cities, when a State is removed, and if the existance of a City > depends on the existance of the corresponding State, then every City > for that state should be removed as well. > Currently the references to the state are set to NULL (by means of > this query = "'UPDATE city SET state=NULL WHERE > state='.strval($this->id)") but then every city that has its State > attribute set to NULL should be removed one by one. Besides, the > persistance of objects with references to other objects set to null is > invalid as a default behaviour. By means of deleting a State you would > be settig every city for that State in an invalid 'situation' (the > word 'state' would have been confusing :p ). > > Perhaps I'm getting this all wrong, please correct me if I am. As I > said before I really put a lot of faith in this project as I think it > would be a great help in my job but I still cant convince myself that > the application is fully capable of satisfying my needs. I hope that > by means of questions liike this I am helping clarify and possibly > correct the functionality of the project and not just annoying you. If you want to remove cities that belong to a state, you can delete the city objects one by one and they automatically will be removed from the(Continue reading)
RSS Feed