AddToDestCollection - 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

AddToDestCollection

Purpose

The CMetaObject class AddToDestCollection adds the specified destination class's object ID to the collection of this CMetaObject for the specified relationship ID. If explanatory information, sExplanation, is provided, it will be included in the new entry..AddToDestCollection only creates a relationship between the current version of this CMetaObject and the current version of the object referenced by lDestID. If necessary, AddToDestCollection will determine the current version for the current object and lDestID.

Description

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

Requirements

The internal object id must be set in the object and it must be for a version of the object. lDestID must be the internal object id of a version of the destination object. CMetaObject must be an object in the origin class and lDestID must be an object in the destination class of the relationship.

Syntax

HRESULT AddToDestCollection(
const OBJECTID_t lDestID, 
const GUID &gRelID, 
const OBJECTID_t lRelID = NULLLOID);
 
HRESULT AddToDestCollection(
const OBJECTID_t lDestID, 
LPCTSTR sExplanation,
const GUID &gRelID, 
const OBJECTID_t lRelID = NULLLOID);
 

Argument

In/Out

Description

lDestID

In

Destination ID of a version of the object to be added to the destination collection

sExplanation

In

Explanatory information limited to 512 characters

gRelID

In

GUID Relationship ID, can be set to NULLGUID if lRelID is set.

lRelID

In
(Optional)

Internal Relationship ID

  • Optional if gRelID is set
  • Must be provided when gRelID is NULLGUID