On May 28, 2008, at 2:44 PM, Lukasz Szybalski wrote:
> sorry. I copied the wrong query....
>
> Just for clarification:
> session.query(th).somefilter is same as th.query().somefilter
>
> correct?

there is a "query" attribute added to mapped classes if you use the  
"mapper" function provided by ScopedSession.  Alternatively,  
ScopedSession also has a method called "query_property" which can be  
used to add a similar attribute without the extra functionality  
implied by ScopedSession.mapper.    Otherwise, theres no such  
attribute "query" added to mapped classes, and you haven't specified  
if you're using one of these extensions.  The behavior of the "query"  
attribute provided by these libraries is to just return a Query so  
there's no difference in behavior.   It is usually common to access  
the attribute as a descriptor, i.e. cls.query.filter(..)....



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