RemoveManyFromOrigCollection - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

RemoveManyFromOrigCollection

Purpose

The CMetaObject class RemoveManyFromOrigCollection function removes a specified list of object IDs from the Origin collection.

Description

RemoveManyFromOrigCollection only removes the current versions of the objects referenced by origIDList from the collection of the CMetaObject's current version. If necessary, RemoveManyFromOrigCollection will determine the current version for the CMetaObject and the entries in origIDList.

The relationship ID is specified by the GUID relationship ID or the internal relationship ID (one must be set).

RemoveFromOrigCollection only removes the current version of the CMetaObject from the collection of lOrigID's current version. If necessary, RemoveFromOrigCollection will determine the current version for the CMetaObject and lOrigID.

If the origin class of the relationship is a superclass, the origIDList can contain IDs of objects of the origin class type and its subclasses.

Requirements

The ObjectID of the destination object must be set in the object and it must be for a version of the object. Each key in origIDList must be for a version of an origin object to be removed from the collection.

Syntax

HRESULT RemoveManyFromOrigCollection(
const LLOBJECTID_t &origIDList, 
const GUID &gRelID, 
const OBJECTID_t lRelID = NULLLOID);
 
HRESULT RemoveManyFromOrigCollection(
const LLOBJECTID_t &origIDList, 
const GUID &gRelID, 
const OBJECTID_t lRelID,
const bool mergeList);
 

Argument

In/Out

Description

origIDList

In

List of ObjectIDs to remove from the CMetaObject origin collection.

gRelID

In

Relationship ID.
Can be set to NULLGUID if lRelID is set.

lRelID

In
(Optional)

Internal Relationship ID.
Optional if gRelID is set.

mergeList

In

If true, IDs in the origIDList which are not in the collection will be ignored. If false, an error will be returned if there are IDs in the list which are not in the collection. mergeList=false is the behavior of the function without the mergeList parameter.