My oh my... I found the problem.  Even though the stack trace
indicated it was using cached objects, this must not have been the
case.  Once I recycled Apache, everything worked fine.

Thanks for your feedback nevertheless,
-Michael

On May 13, 5:46 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On May 13, 2007, at 1:42 PM, Michael Harrison wrote:
>
>
>
>
>
> > I'm trying to execute a simple query using SA.  The following python
> > script *works*:
>
> > dbsession = create_session()
> > results = dbsession.query(User).select_by([EMAIL PROTECTED]')
> > for user in results:
> >     print user.email
> > dbsession.close()
>
> > However, I get an error when the following code executes from within a
> > mod_python function:
>
> > dbsession = create_session()
> > results = dbsession.query(User).select_by([EMAIL PROTECTED]')  #
> > This throws an exception
>
> > The error message I get is the following:
> > AttributeError: 'ColumnProperty' object has no attribute 'strategy'
>
> something to do with either mappers not being compiled or with not
> all of your mapped classes completely set up.  query(User) should
> compile all mappers immediately if they are not already so.  cant
> tell much else without a full stack trace.


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

Reply via email to