Hi, I have the following set up in a Pylons application:
project_table = Table("PROJECT", metadata, autoload=True, autoload_with=config['pylons.g'].sa_engine) studio_table = Table("STUDIO", metadata, autoload=True, autoload_with=config['pylons.g'].sa_engine) class Project(object): pass class Studio(object): pass mapper(Project, project_table, properties = {'studio' : relation(Studio)}) mapper(Studio, studio_table) I'm using an Oracle database and the PROJECT table has a foreign key to STUDIO. But when I go to grab a Project object I get this error: sqlalchemy.exceptions.ArgumentError: Error determining primary and/or secondary join for relationship 'Project.studio (Studio)'. If the underlying error cannot be corrected, you should specify the 'primaryjoin' (and 'secondaryjoin', if there is an association table present) keyword arguments to the relation() function (or for backrefs, by specifying the backref using the backref() function with keyword arguments) to explicitly specify the join conditions. Nested error is "Can't find any foreign key relationships between 'PROJECT' and 'STUDIO'" I'm following the SQL Alchemy docs 0.4beta6 and the syntax seems to be correct. Do I need primaryjoin? Help a noobie out ;-) Thanks, Jon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---