I'm trying to build a front end for a project I'm working on. The back
end uses SQLAlchemy and from from what I can tell my table
definitions, classes and maps are all working fine. I've copied the
SQLAlchemy table, class and maps from the back end module into
myproject.model.mymodel.py (http://paste.turbogears.org/paste/11547).

I'd like to use DBMechanic as an admin CRUD until I flesh out a full
front end so I've added "metadata.bind = engine" to
myproject.model.__init__.py in init_model() and at the bottom of
__init__.py I've added "from mymodel import *".

There are three tables defined in mymodel.py keyword_table, site_table
and site_keyword_table.

The error that comes up is "UnboundExecutionError: This Select object
is not bound and does not support direct execution. Supply this
statement to a Connection or Engine for execution. Or, assign a bind
to the statement or the Metadata of its underlying tables to enable
implicit execution via this method.". At first I thought it I had
missed binding the engine to the metadata but after double checking
that I commented out every table mapper and class from mymodel and
added them back one table, class and mapper at a time. DBMechanic
works as expected when I comment out site_keyword_table and change the
mapper for the Site class to be "mapper(Site, site_table)".

Can anyone point out what I am missing or doing wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to