Hi Michael, > what I see immediately is that you're declaring mutliple > declarative_bases and multiple MetaData objects. All of the Table > objects which relate to one another need to share the same underlying > MetaData object, and the declarative_base() function also uses a > MetaData object which it creates for you, unless one is passed. > > So you need a "global" module everyone works from which starts with > something like:
Thank you for pointing this out, it certainly sounds like it could be the problem, it would explain why none of the tables seem to know about one another :-D I have a singleton module which is a factory for my database connections which gets passed around into the beans, I will place these metadata and declarative base classes into that and see how that helps. I'll give this a try in the next few hours and let you know how I get on. 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 -~----------~----~----~----~------~----~------~--~---