I am getting the following exception, but I can't figure out what I specified incorrectly. I have other relations setup which work fine. Appreciate if someone can put me right.
File "c:\downloaded software\python\sqlalchemy-0.4.0beta6\lib\sqlalchemy\orm\properties.py", line 402, in _determine_joins raise exceptions.ArgumentError("""Error determining primary and/or secondary join for relationship '%s'. If the underlying error cannot be corrected, you should specify the 'primaryjoin' (and 'secondaryjoin', if there is an association table ........) When I do this: print session.query(model.Preferences).get(1) The relevant part (I think) of the model is the following: imagetype_ls_table = sa.Table(u'imagetype_ls', metadata, sa.Column(u'id', sa.Integer()), sa.Column(u'imagetypeid', sa.Integer(), primary_key=True, nullable=False), sa.Column(u'name', sa.String(length=30, convert_unicode=False)), sa.Column(u'shortname', sa.String(length=10, convert_unicode=False)), sa.Column(u'created', sa.Date()), sa.Column(u'updated', sa.Date()), sa.Column(u'fk_langid', sa.Integer()), sa.Column(u'centralkey', sa.Integer()), ) class Imagetype_Ls(OrmObject): pass preferences_table = sa.Table(u'preferences', metadata, sa.Column(u'prefid', sa.Integer(), primary_key=True, nullable=False), ... sa.Column(u'fk_langid', sa.Integer(), sa.ForeignKey(u'language.langid'), nullable=False), ... sa.Column(u'fk_imagetypeid', sa.Integer(), sa.ForeignKey(u'imagetype_ls.imagetypeid')), sa.Column(u'rec_fk_imagetypeid', sa.Integer(), sa.ForeignKey(u'imagetype_ls.imagetypeid')), ... sa.Column(u'bottletagsassign', sa.String(length=1, convert_unicode=False)), ) class Preferences(OrmObject): pass preferences = sao.mapper(Preferences, preferences_table, properties={ 'language': sao.relation(Language), 'imagetype_ls': sao.relation(Imagetype_Ls) }) Thanks in advance Werner --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---