[sqlalchemy] Error: When initializing mapper, expression failed to locate a name (name is not defined).

2011-08-13 Thread Tim Black
I'm getting the following error message running TurboGears 2.1.1 and SQLAlchemy 0.7.2, using TurboGears' multiple database setup described here: http://turbogears.org/2.1/docs/main/MultipleDatabases.html. Both databases are SQLite3 databases; one is the main database for the TurboGears app; the

Re: [sqlalchemy] Error: When initializing mapper, expression failed to locate a name (name is not defined).

2011-08-13 Thread Michael Bayer
Do you have the metadata in Table shared with the metadata used by DeclarativeBase ? Otherwise the name ticket won't be located via the ForeignKey you're declaring in the WorkDone class. As an alternative you could link the ForeignKey to ticket.c.id but would be easier if you could use the