On Apr 22, 2008, at 10:45 AM, maxi wrote:
> > Hi, > I've a problem to do a many to many relationship mapper declaration. > I will try to explain this with an example: > > person_table(per_id, name, ...) > > per_per_table(id, per_orig_id, per_dest_id) > > per_orig_id = foreign key, reference to person_table.per_id > per_dest_id = foreign key, reference to person_table.per_id > > How map this? I do... > > mapper(Person, person_table, properties={'dest': relation(Person, > secondary=per_per_table)} > > I want to do: > > per = Person() > per_dest = Person() > > per.dest.append(per_dest) > > But, sqlalchmey can't determinate how do the relationship: "Error > determining primary and/or secondary join for relationship" > use explicit primaryjoin/secondaryjoin: http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relation_customjoin --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---