if u look up the stacktrace/traceback, u'll see which statement in your own code triggered the error. is it in the mapping-part or is still in table-declaration part? do all 3 tables use same metadata?
On Friday 11 July 2008 17:31:31 Heston James - Cold Beans wrote: > > the association table is an instance of Table, > > and does not need its own class. It's easiest to declare > > the association table in the same module as that which > > it is used, in this case "post.py". > > Ok this sounds fine, I've done this now, declaring the table in the > post.py module. > > > When you create "post.py", that creates Post, and in order > > to create the relation either needs to import "keyword.py" > > directly, or, when a third module uses "post.py" it would have to > > also import "keyword.py" before using the Post class. > > That's fine too, I've now imports keyword into post. > > I'm now getting a new error thrown at me though: > > File "/var/lib/python-support/python2.5/sqlalchemy/schema.py", line > 788, in column "foreign key" % tname) > sqlalchemy.exceptions.NoReferencedTableError: Could not find table > 'post' with which to generate a foreign key > > This is unusual as the table post does exist in the database, and > is also declared as the class in the post.py module. > > Any ideas? > > Thanks Michael, > > Heston > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---