def dbRestore(self, db_value, context=None):
if isinstance(db_value, (str, unicode)) and db_value.startswith('<STR_LIT:{>'):<EOL><INDENT>try:<EOL><INDENT>db_value = projex.text.safe_eval(db_value)<EOL><DEDENT>except StandardError:<EOL><INDENT>log.exception('<STR_LIT>')<EOL>raise orb.errors.OrbError('<STR_LIT>')<EOL><DEDENT><DEDENT>if isinstance(db_value, dict):<EOL><INDENT>cls = self.referenceModel()<EOL>if not cls:<EOL><INDENT>raise orb.errors.ModelNotFound(schema=self.reference())<EOL><DEDENT>else:<EOL><INDENT>load_event = orb.events.LoadEvent(data=db_value)<EOL>if context:<EOL><INDENT>context = context.copy()<EOL>expand = context.expandtree(cls)<EOL>sub_expand = expand.pop(self.name(), {})<EOL>context.expand = context.raw_values['<STR_LIT>'] = sub_expand<EOL><DEDENT>db_value = cls(loadEvent=load_event, context=context)<EOL><DEDENT><DEDENT>return super(ReferenceColumn, self).dbRestore(db_value, context=context)<EOL>
Extracts the db_value provided back from the database.

:param db_value: <variant>
:param context: <orb.Context>

:return: <variant>