hi,

we're developing a desktop app using sa so the sessions is long living. 
we use postgres and sqlite.

1. sometimes we see same object twice in one to many relation. 
it's very hard to reproduce and the problem is gone after commit. 
does anyone else seen such a behavior?

2. sometimes i do "ob.relation = []" and repopulate with new entries but 
after commit the old entries are still there. 
i can't reproduce it in tests. it only happens while people use the app.
the relation is configured with cascade='all,delete-orphan'

3. all the write operations are wrapped in "with session.begin()" blocks 
but sometimes unhandled error occures (mostly due bugs) and and the session 
is left in "zombie mode".
is there a way to auto rollback last transaction in that case?

4. what's the right way to modify session state in after 
insert,update,delete event handler or something similar?
for example i have parent object with collection of child objects. i want 
to recompute in python a column on the parent object whenever child is 
added,updated or deleted.
in most cases triggers are fine but debugging sqlite triggers is driving me 
nuts...

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to