def record_to_relation_dump(record, relation):
    """Convert a record to a relation dump."""
    return dict(
        pid=record[record.pid_field],
        pid_type=record._pid_type,
        relation_type=relation.name
    )