[sqlalchemy] Bug? Declarative syntax for double self-referential constructs with association object

2011-08-26 Thread Thomas Jacob
Hello List I'd like to define a many-to-many relationship using the declarative syntax between a table to itself, but employing an association object (since I require the association to have attributes also). Here's what I tried:

Re: [sqlalchemy] Bug? Declarative syntax for double self-referential constructs with association object

2011-08-26 Thread Thomas Jacob
On Aug 26, 2011, at 9:36 PM, Michael Bayer wrote: the error message here isn't fantastic but I think you mean to say: oa = ObjectAssociation() o2.relate_down.append(oa) o.relate_up.append(oa) as relate_up/relate_down accept ObjectAssociation objects, not Object objects, as members.

Re: [sqlalchemy] Bug? Declarative syntax for double self-referential constructs with association object

2011-08-26 Thread Michael Bayer
On Aug 26, 2011, at 4:06 PM, Thomas Jacob wrote: On Aug 26, 2011, at 9:36 PM, Michael Bayer wrote: the error message here isn't fantastic but I think you mean to say: oa = ObjectAssociation() o2.relate_down.append(oa) o.relate_up.append(oa) as relate_up/relate_down accept