Skip to main content
summaryrefslogtreecommitdiffstats
blob: 56e57f05ccccd97f1998edae975a9848f97ac3e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
transformation umlRdbms {
	middle imports tuml2rdbms;
	uml imports umlMM;
	rdbms imports rdbmsMM;
}

map AttributeColumn_ClassToTable_rdbms in umlRdbms
{
	check uml (c:Class) {
		a:Attribute, p:PrimitiveDataType|
		c.attribute = Set{a};														--** added Set{}
		a.type = p;
	}
	check enforce rdbms (t:Table) {
		realize cl:Column |
		t.column := cl;
	}
	where middle (v1:TClassToTable| v1.c = c; v1.t = t;) {
		realize v2:TAttributeToColumn, an:String, pn:String, sqlType:String |		--** changed AttributeToColumn to TAttributeToColumn
		v2.c := c;
		v2.a := a;
		v2.p := p;
		v2.t := t;
		v2.cl := cl;
		an := a.name;
		pn := p.name;
		cl.name := an;
		sqltype := if (pn ='INTEGER') then 'NUMBER' else 'VARCHAR' endif;			--** added ;
	}
	map {
		where () {
			cl.type := sqlType;
		}
	}
}

Back to the top