Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3576

Re: scripting mapping between Physical data models

$
0
0

This is my OOM example.

My first OOM has a class Human which has two attributes:

Owner

Age

 

The second OOM has a class Animal which has two attributes:

dog

cat

 

The goal is to map  dog to Age.

 

 

set m1=OpenModel("D:\cases\myOOMSource.oom")

Set ds1 = m1.DataSources.CreateNew()
ds1.setNameandCode "myOOMSource", "myOOMSource"
 

set m2=OpenModel("D:\cases\myOOMTarget.oom")

ds1.AddSource m2

set SourceTab=m1.findchildbyname("Human", PDOOM.cls_Class)
set TargetTab=m2.findchildbyname("Animal",PDOOM.cls_Class)

set SourceCol=SourceTab.findchildbyname("Age", PDOOM.cls_Attribute)
set TargetCol=TargetTab.findchildbyname("dog", PDOOM.cls_Attribute)

set map=ds1.CreateMapping(SourceCol)
map.addSource(TargetCol)


Viewing all articles
Browse latest Browse all 3576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>