[sqlalchemy] Re: : Declarative and association object same model

2009-09-04 Thread asrenzo
Here is a primaryjoin, secondaryjoin I tried without success: neighbors = relation(Place, primaryjoin=(Place.id == neighbors_table.place_id), secondaryjoin= (neighbors_table.neighbor_id == Place.id), secondary=neighbors_table) and the error is: sqlalchemy.exc.InvalidRequestError: When

[sqlalchemy] Re: : Declarative and association object same model

2009-09-04 Thread Michael Bayer
asrenzo wrote: Here is a primaryjoin, secondaryjoin I tried without success: neighbors = relation(Place, primaryjoin=(Place.id == neighbors_table.place_id), secondaryjoin= (neighbors_table.neighbor_id == Place.id), secondary=neighbors_table) and the error is:

[sqlalchemy] Re: : Declarative and association object same model

2009-09-04 Thread Laurent Rahuel
Thanks Michael, Everything is OK now. Sorry for the typo, I was renaming my classes. Regards, Laurent Le 04/09/2009 16:30, Michael Bayer a écrit : asrenzo wrote: Here is a primaryjoin, secondaryjoin I tried without success: neighbors = relation(Place, primaryjoin=(Place.id ==

[sqlalchemy] Re: : Declarative and association object same model

2009-09-04 Thread Michael Bayer
Laurent Rahuel wrote: Thanks Michael, Everything is OK now. Sorry for the typo, I was renaming my classes. it wouldn't be tough for us to enhance declarative such that you can name Table objects in those strings as wellsince we have the MetaData available.I'll add a ticket.