#NEWLINE# @ staticmethod #NEWLINE# def _from_db_object( context , instance_group , db_inst ) : #NEWLINE# #INDENT# 'Method to help with migration to objects.\n\n        Converts a database entity to a formal object.\n        ' #NEWLINE# for field in instance_group . fields : #NEWLINE# #INDENT# if ( field in LAZY_LOAD_FIELDS ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( field == 'deleted' ) : #NEWLINE# #INDENT# instance_group . deleted = ( db_inst [ 'deleted' ] == db_inst [ 'id' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# instance_group [ field ] = db_inst [ field ] #NEWLINE# #UNINDENT# #UNINDENT# instance_group . _context = context #NEWLINE# instance_group . obj_reset_changes ( ) #NEWLINE# return instance_group