Mh, amol!
I'm a little bit hesitating to use SQLAlchemy events, because that would require lots of changes, since I effectively query trough nearly all model classes for generating a menu on the pages (and e.g. the User instance in request.identity).
I also tried expunging the objects while placing them in the tmpl_context/request, but that didn't work, too...
expire_on_commit=False is set, too, but since there's no commit, this doesn't work here, too.
Is there an argument against using session.rollback() in the tgext.crud error handler?
I mean, when I use session.commit(), I get an Exception saying that I should use transaction.commit() instead, but session.rollback() seems to work (and it apparently has a slightly different functionality).
Maybe percious could throw his two cents in... :D
Regards,
Moritz