#NEWLINE# @ observe ( 'db' ) #NEWLINE# def _db_changed( self , change ) : #NEWLINE# #INDENT# 'Changing db session reacquires ORM User object' #NEWLINE# if change . orm_user : #NEWLINE# #INDENT# id = self . orm_user . id #NEWLINE# self . orm_user = change [ 'new' ] . query ( orm . User ) . filter ( ( orm . User . id == id ) ) . first ( ) #NEWLINE# #UNINDENT# self . spawner . db = self . db