@staticmethod
def _from_db_object(registry, db_registry):
    """Converts a database entity to a formal object."""
    for field in registry.fields:
        setattr(registry, field, db_registry[field])
    registry.obj_reset_changes()
    return registry
