if (!toSave.isDeleted()) {
if (!toSave.isDeleted() && toSave.isModified()) {
    void save() {        Property prop = m_parent.getObjectType().getProperty(m_role);        Property ass = prop.getAssociatedProperty();        if (m_cleared) {            m_parent.doRoleClear(m_role);        } else {            for (Iterator it = m_fetched.iterator(); it.hasNext(); ) {                GenericDataObject toSave = (GenericDataObject) it.next();                if (!toSave.isDeleted()) {                    toSave.save();                }            }            for (Iterator it = m_toRemove.iterator(); it.hasNext();) {                GenericDataObject toRemove = (GenericDataObject) it.next();                m_parent.doRoleRemove(m_role, toRemove.getDataContainer());                if (prop.isComponent() || m_linkType != null) {                    toRemove.delete();                }                if (!prop.isComponent() && ass != null &&                    !ass.isCollection()) {                    GenericDataObject obj =                        (GenericDataObject) toRemove.get(prop.getName());                    obj.getDataContainer().clearProperty(ass.getName());                    obj.getDataContainer().initProperty(ass.getName(), null);                }            }        }        for (Iterator it = m_toAdd.iterator(); it.hasNext(); ) {            GenericDataObject toAdd = (GenericDataObject) it.next();            if (ass != null && !ass.isCollection()) {                GenericDataObject obj =                    (GenericDataObject) toAdd.get(prop.getName());                obj.getDataContainer().clearProperty(ass.getName());                obj.getDataContainer().initProperty(ass.getName(), m_parent);            }            if (prop.isComponent() || m_linkType != null) {                toAdd.save();            }            m_parent.doRoleAdd(m_role, toAdd.getDataContainer());        }        sync();    }