From: Ian B. <ia...@co...> - 2003-11-10 00:58:03
|
On Nov 9, 2003, at 5:01 PM, John Baker wrote: > If I have a join between A and B called AjoinB, and I remove A via > A.destroySelf(); is SQLObject supposed to clean the join tables? > > If the answer is no, I suspect this would be a very handy feature... From a quick inspection of the code, no, that's not implemented. Yes, it should be. > Also, further to my previous mail about Story and Reply, where I could > not do > Story.addReply (MultipleJoin), I think that's because I'm supposed to > pass > the Story to the Reply as I build it. I think there should also be a > method > of doing this via Story.addReply, where SQLObject 'commits' the 'new' > Reply > to the database and sets up the foreign key pointing back to the > Story. That > would be more consistent. Hmm... right now if, say, you have a many-to-one relationship between Replies and Stories, then you have Story.replies. But that's just a dumb list. I've thought about an addReply-like method, which would assign the story_id column of Reply. But I don't quite like it, because you aren't just adding the reply, you are moving it (if it previously had a story). -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |