Christopher Arndt schrieb:
> Christopher Arndt schrieb:
>>> but maybe something like this could do the trick:
>>>
>>> cls.query.__call__ = lambda self: self
>> Ok, I'll try that and write a test for it.
>
> That doesn't work, unfortunately.
You're right, this needs to be done more complicated:
def query_cls(mapper, session):
class query(session.query(mapper).__class__):
__call__ = lambda self: self
return query(mapper)
cls.query = scoped_session.query_property(query_cls)
Not sure if it's worth the effort, though.
-- Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---