et at
> the related "pets" collection, rather than appending to the query directly
> as joinedload does. Your other option would be to use a custom primaryjoin
> on User.pets that adds in "deleted=null" to the criterion, which joinedload
> would make use of.
>
&
t: http://pastie.org/3848978
Thank you,
Andrei Chirila
--
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
sqlalchemy+unsubscr
he end, to have 5 objects with counters 4, 3, 2, 1, 0.
Thank you,
Andrei Chirila
--
Mobile: +49 151 42647382
e-Mail: andre...@gmail.com
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalc
uper(DeletedAtQuery, self).\
delete(synchronize_session=synchronize_session)
I hope this covers all the cases.
Thank you very much,
Andrei Chirila
On Wed, Sep 21, 2011 at 4:52 PM, Michael Bayer wrote:
>
> On Sep 21, 2011, at 9:53 AM, Andrei Chirila wrote:
>
> Hello,
&g
int(time.time())
session.add(obj)
def configure_events(session):
""" Helper for applying before_flush hook """
event.listen(session, 'before_flush', paranoid_delete)
I'm using _compile_context private method, and I would like to know
ted:
# print ">> deleted object:", instance, " -> ", obj
if hasattr(obj, 'deleted_at'):
print "moving object back: ", obj
obj.deleted_at = int(time.time())
session.add(obj)
and it seems to do what it was
SqlAlchemy user, I would like to ask if anyone can see any obvious
mistake in the following code (I'm sure I missed bulk deletion and
session explunge, but I don't really know how to integrate them).
Any feedback would be appreciated.
Thank you,
Andrei Chirila
from sqlalchemy.orm.query