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 compiling mapper Mapper|Shop|
shops, expression 'Shop.id == neighbours_table.shop_id' failed to
locate a name ("name 'neighbours_table' is not defined"). If this is a
class name, consider adding this relation() to the <class
'shoplocator.orm.shop.Shop'> class after both dependent classes have
been defined.

Which I can't understand because neighbors table is defined before the
Place class definition.

Regards,

Laurent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to