# Synopsis

PDX_MSGT mda_ModifyParents(long option, long parent_count, MDA_PTR *parent_list, MDA_PTR old_child, MDA_PTR new_child)

# Purpose

Replaces references from a parent to a child.

# Description

References in each entity in parent_list to old_child will be replaced with references to new_child. Backpointer information is updated for both old_child and new_child. The typical way of invoking this function would be to call mda_GetParents on old_child to obtain a list of its parents. This list would then be passed to this function, along with the new pointer new_child. Upon returning, all of the references to old_child will have been replaced with references to new_child. Note that this requires locking each of the parent entities and then unlocking them with the MDA_MODIFIED option. This means that applications which have entities in parent_list already locked must be careful not to unlock them with the MDA_INVALIDATE option (or else the changes made here will be lost).

# Input

## option

Options (not used)

## parent_count

Number of pointers in parent_list

## parent_list

List of parents of old_child to update

## old_child

Entity reference to update in parent_list

## new_child

Entity to replace references to old_child with

# Return

MDA error code