Re: [SQLObject] Self-Joins

2008-12-10 Thread Richard Cooke
Thanks for your help and clarification. Implementing my own method if I need this sounds good enough for me. Oleg Broytmann wrote: > On Tue, Dec 09, 2008 at 05:11:38PM +, Richard Cooke wrote: > >> Can I insert this relationship the other way round at all? How could I >> specify that rBird

Re: [SQLObject] Self-Joins

2008-12-09 Thread Oleg Broytmann
On Tue, Dec 09, 2008 at 05:11:38PM +, Richard Cooke wrote: > Can I insert this relationship the other way round at all? How could I > specify that rBirds is a child of rPets instead of specifying that rPets > is the parent of rBirds? I tried: > > rPets.addChildren(rBirds) > > But addChildre

Re: [SQLObject] Self-Joins

2008-12-09 Thread Richard Cooke
Hmm, it seems I don't have a problem after all. I have just changed my code to this again and it works. I was sure I'd already tried this approach and got an error. Can I insert this relationship the other way round at all? How could I specify that rBirds is a child of rPets instead of specifyi

Re: [SQLObject] Self-Joins

2008-12-09 Thread Oleg Broytmann
On Tue, Dec 09, 2008 at 03:30:58PM +, Richard Cooke wrote: > rBirds = prodcats.new(name="birds", longname="Birds") > rBirds.parent = rPets It is possible if the default for the column is None. What problems do you have? Oleg. -- Oleg Broytmannhttp://phd.pp.ru/

[SQLObject] Self-Joins

2008-12-09 Thread Richard Cooke
I saw this example: http://wiki.sqlobject.org/joinexample.html of an object being joined to itself in a parent/child relationnship, but I have not managed to find a way to set the parent object after the object has been added. E.g. instead of using this: rBirds = prodcats.new(name="birds", lon