and in 0.8 its this:

from sqlalchemy import inspect
session = inspect(obj).session



On May 2, 2013, at 12:50 PM, Gunnlaugur Thor Briem <gunnlau...@gmail.com> wrote:

> Yep: object_session(obj)
> 
> http://docs.sqlalchemy.org/en/rel_0_8/orm/session.html#sqlalchemy.orm.session.Session.object_session
> 
> Regards,
> 
> Gulli
> 
> 
> 
> On Thu, May 2, 2013 at 4:47 PM, Jonathan Vanasco <jonat...@findmeon.com> 
> wrote:
> i'm trying to deal with some old code , and need to 'log' a change.  in the 
> current code block, I do not have a SqlAlchemy session object - i merely have 
> an ORM object that exists in a given session.
> 
> is it possible to extract the session object from that ORM object, so I can 
> just add a new ORM object to it?  doing the correct thing, and getting the 
> session object into the code block properly will take more time than I have 
> right now.
> 
> -- 
> 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 sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> 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 sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to