I believe you want to call turbogears.database.bind_meta_data() to  
ensure that it's set at the time you need it.

Kevin

On Jul 24, 2006, at 5:03 PM, Karl Guertin wrote:

>
> I have some 0.91 sqlalchemy code that I'm trying to get up to date.
> For the most part, I've found where everything moved and am impressed
> at how much better the SA integration is than my hackjob.
>
> The one problem at the moment is that I have a few scheduled functions
> that are throwing
>
> InvalidRequestError: This Compiled object is not bound to any engine.
>
> when called. The offending queries are from assign_mapper'd objects
> and look like:
>
> select([func.count('*')],self.c.tstamp > (now-tdelta)).execute()
>
> Which is written using self.c because the same code operates on three
> identically structured tables.
>
> This code works fine when run using tg-admin shell and some queries
> succeed, so it's only some of the queries that are unbound. So my
> question is: what am I missing when it comes to binding an engine?
>
> (I'm hoping someone can provide me with a quick answer before I have
> to start reading source code.)
>
> Regards,
> Karl
>
> >


--
Kevin Dangoor
TurboGears / Zesty News

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to