#NEWLINE# def reload( self , subj ) : #NEWLINE# #INDENT# ' Reload properties and relationships from a database node into\n        `subj`.\n\n        :param subj: the object to reload\n        :raise NotSaved: if `subj` is not linked to a database node\n        ' #NEWLINE# self . _assert_saved ( subj ) #NEWLINE# node = subj . __node__ #NEWLINE# for key in subj . __dict__ : #NEWLINE# #INDENT# if ( ( not key . startswith ( '_' ) ) and ( key not in node ) ) : #NEWLINE# #INDENT# setattr ( subj , key , None ) #NEWLINE# #UNINDENT# #UNINDENT# for ( key , value ) in node . items ( ) : #NEWLINE# #INDENT# if ( not key . startswith ( '_' ) ) : #NEWLINE# #INDENT# setattr ( subj , key , value ) #NEWLINE# #UNINDENT# #UNINDENT# subj . __rel__ = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for rel in self . graph . match ( subj . __node__ ) : #NEWLINE# #INDENT# t = rel . type ( ) #NEWLINE# if ( t not in subj . __rel__ ) : #NEWLINE# #INDENT# subj . __rel__ [ t ] = [ ] #NEWLINE# #UNINDENT# subj . __rel__ [ t ] . append ( ( dict ( rel ) , rel . end_node ( ) ) )