Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: basalt on April 23, 2008, 08:05:16 pm

Title: Transformation Template Class to Table and Attribute to Column
Post by: basalt on April 23, 2008, 08:05:16 pm
Hi all.
There is a nice sentense in the help file:
"In the column definition, you cannot assign a value to the NotNull, PrimaryKey or Unique properties.
"
But how can i mark a column in the transformation as PrimaryKey?

thx
george
Title: Re: Transformation Template Class to Table and Attribute to Column
Post by: Ondrej Kolenaty on April 27, 2008, 11:49:04 pm
The sentence in help means, that you cannot do
Code: [Select]
notNull="something", but if you want a column to be not null, just use
Code: [Select]
notnull.

Example:
Code: [Select]
Column
{
  name="IAmNotNull"
  notnull
}

I tried "primaryKey" flag to make a column primary key, but that doesn't work. Anyway you can use:
Code: [Select]
Table
{
  PrimaryKey
  {
    Column
    {
      name="id"
      type=.......
    }
  }
}
Title: Re: Transformation Template Class to Table and Attribute to Column
Post by: basalt on April 28, 2008, 08:17:54 pm
Hi Ondrej Kolenaty

Thanks for the answer, you example
work well.

thx
george