[sqlalchemy] Re: 'both of the same direction' relation error appears when upgrading from 0.5.2 to 0.5.4p2

2009-06-29 Thread Michael Bayer
Matthieu wrote: > > On Jun 27, 4:18 pm, Michael Bayer wrote: >> Basically foreign_keys and remote_side never have to be set unless the   >> error messages tell you to.  In this case it told you to set   >> "remote_side" and it was a simple misunderstanding. > > Thanks a lot Michael, i've included

[sqlalchemy] Re: 'both of the same direction' relation error appears when upgrading from 0.5.2 to 0.5.4p2

2009-06-29 Thread Matthieu
On Jun 27, 4:18 pm, Michael Bayer wrote: > Basically foreign_keys and remote_side never have to be set unless the   > error messages tell you to.  In this case it told you to set   > "remote_side" and it was a simple misunderstanding. Thanks a lot Michael, i've included your modifications and it

[sqlalchemy] Re: 'both of the same direction' relation error appears when upgrading from 0.5.2 to 0.5.4p2

2009-06-27 Thread Michael Bayer
your foreign key is also entity.id_creator. the foreign_keys setting is unnecessary in any case since you have a ForeignKey() object on your column which is present in your join condition. so removing the erroneous entry: mapper(Entity, entity_table, polymorphic_on = ent

[sqlalchemy] Re: 'both of the same direction' relation error appears when upgrading from 0.5.2 to 0.5.4p2

2009-06-27 Thread Matthieu
On Jun 27, 12:46 am, "Michael Bayer" wrote: > "remote_side" referenced in the error message as well as the google groups > messages you reference is an actual option you can set on relation() and > backref(), and is required any time you have a self-referential > many-to-one relation.   Since Cli

[sqlalchemy] Re: 'both of the same direction' relation error appears when upgrading from 0.5.2 to 0.5.4p2

2009-06-26 Thread Michael Bayer
Matthieu Imbert wrote: > Hi, > > sqlalchemy.exc.ArgumentError: Entity.creator and back-reference > Client.entities_created are both of the same direction 'ONETOMANY>. > Did you mean to set remote_side on the many-to-one side? > > relation(Client, > collection_cla