@classmethod<EOL><INDENT>def get_record(cls, id_, with_deleted=False):<DEDENT>
with db.session.no_autoflush:<EOL><INDENT>query = RecordMetadata.query.filter_by(id=id_)<EOL>if not with_deleted:<EOL><INDENT>query = query.filter(RecordMetadata.json != None)  <EOL><DEDENT>obj = query.one()<EOL>return cls(obj.json, model=obj)<EOL><DEDENT>
Retrieve the record by id.

        Raise a database exception if the record does not exist.

        :param id_: record ID.
        :param with_deleted: If `True` then it includes deleted records.
        :returns: The :class:`Record` instance.