Author Topic: Transformation Template Class to Table and Attribute to Column  (Read 787 times)

basalt

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
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

Ondrej Kolenaty

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Transformation Template Class to Table and Attribute to Column
« Reply #1 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=.......
    }
  }
}

basalt

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Transformation Template Class to Table and Attribute to Column
« Reply #2 on: April 28, 2008, 08:17:54 pm »
Hi Ondrej Kolenaty

Thanks for the answer, you example
work well.

thx
george