On Wed, 9 Feb 2011 10:34:22 +0100 Enrico Morelli <more...@cerm.unifi.it> wrote:
> mapper(AtomInfo, atominfo_table, > properties={ > 'residue': relationship(ResidueInfo, backref='atominfo'), > 'periodic': relationship(Periodic, backref='atominfo'), > 'atom1': relationship(AtomAtom) > }) > > mapper(AtomAtom, atom_atom_table, > properties={ > 'atom2': relationship(AtomInfo) > }) > Using the following mapper, I haven't the error: mapper(AtomInfo, atominfo_table, properties={ 'residue': relationship(ResidueInfo, backref='atominfo'), 'periodic': relationship(Periodic, backref='atominfo'), 'atom1': relationship(AtomAtom, primaryjoin=atominfo_table.c.id==atom_atom_table.c.atom1_id) }) mapper(AtomAtom, atom_atom_table, properties={ 'atom2': relationship(AtomInfo, primaryjoin=atominfo_table.c.id==atom_atom_table.c.atom2_id) }) Is that the correct solution? Thanks again. -- ------------------------------------------------------------------- (o_ (o_ //\ Coltivate Linux che tanto Windows si pianta da solo. (/)_ V_/_ +------------------------------------------------------------------+ | ENRICO MORELLI | email: more...@cerm.unifi.it | | * * * * | phone: +39 055 4574269 | | University of Florence | fax : +39 055 4574253 | | CERM - via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY | +------------------------------------------------------------------+ -- 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.