[sqlalchemy] Re: many-to-many relation, 'secondaryjoin' is needed as well
Can you post your solution? On Jun 2, 6:38 am, Gera88 gger...@gmail.com wrote: Oh I did it Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: many-to-many relation, 'secondaryjoin' is needed as well
Oh I did it Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: many-to-many relation, 'secondaryjoin' is needed as well
1. the backref is invalid. you're attempting to create a relation called services twice on the same class. 2. the relation is self-referential - it can't be automatically determined which join to apply for Service-service_type_table and service_type_table-Service - you need to use both primaryjoin and secondaryjoin to define this. examples are athttp://www.sqlalchemy.org/docs/05/mappers.html#specifying-alternate-j... . In example there are two classes class User(object): pass class Address(object): pass but I have only one It it possible to make join like Service 2 marked table B can contain Service 1, 3 marked table A in the same table [service] id table name code 1Aservice1 9843904 2Bserivce2 4394343 3Aservice3 6632901 [service_btype] service_b_idservice_a_id 2 1 2 3 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---