using 0.5:

from sqlalchemy.orm import Query, sessionmaker

class MyQuery(Query):
    def __new__(cls, entities, **kwargs):
        if hasattr(entities[0], 'deleted_at'):
            return Query(entities,
**kwargs).filter_by(deleted_at=None)
        else:
            return object.__new__(cls)

Session = sessionmaker(query_cls=MyQuery)

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