On Dec 19, 2012, at 1:22 PM, Russ wrote:

> Whoops - _is_clean() doesn't make it up to a ScopedSession...
> 
> Digging into why this is the case I see the registry pattern in there.  Is it 
> a safe/valid cheat to access the registry directly and do this?
> 
> if my_scoped_session.registry()._is_clean():
>     print "an attempt to modify the session was made!"


just call upon the scoped_session itself, it has __call__() for this purpose:

scoped_session()._is_clean()

the current docs are carefully written to explain all this:  
http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#contextual-thread-local-sessions


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en.

Reply via email to