Book a Demo

Author Topic: Transformation of tagged value in foreign keys  (Read 3423 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Transformation of tagged value in foreign keys
« on: August 21, 2009, 01:28:26 am »
Something from the frustration department...
The transformation editor has lots of possibilities to write various transformation rules (as it is supposed to do, well).

The question is: Why does a DDL connector template of the following kind transform name and notes but no tagged values (excerpt from the foreign key section)?

Code: [Select]
   Column
    {
%if connectorDestRole != ""%
      name=%qt%%connectorDestRole%%qt%
%else%
      name=%qt%%CONVERT_NAME(connectorDestElemName, "Pascal Case","Camel Case")%ID%qt%
%endIf%
      type=%qt%%CONVERT_TYPE(genOptDefaultDatabase,"Integer")%%qt%
        notes="Hallo Source Column1"
        
        Tag
        {
            name="A"
            value="B"
        }
    }      
  }

The resulting foreign key has the "Hello Source Column1" note but not the tagged value "A:B". In EA I can add a tagged value to a foreign key attribute from the tagged value editor without problems.
From the templates I do not seem to be able to do so.
Well.

Oliver

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Transformation of tagged value in foreign keys
« Reply #1 on: August 21, 2009, 10:18:39 am »
Code templates currently can't create tagged values on connectors.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Transformation of tagged value in foreign keys
« Reply #2 on: August 21, 2009, 04:59:39 pm »
Quote
Code templates currently can't create tagged values on connectors.

The issue is not about creating it for connectors. EA generates an  attribute of stereotype FK and I am unable to set the tagged values for this. I can change its name and notes but not the tagged values.

Well at least those are created in the intermediary language file. The log file shows them correctly in the right sections. They simply are not copied over to the EA objects. And I can create them manually inside EA.

As foreign keys are created at transformation time the corresponding attributes are not modelled in the PIM. Any identity of such foreign keys has to be attached to the association link then and for this it needs tagged values and at transformation time being copied to th eFK attribute- especially if some post processing is required after the transformation (set unique and check constraints, etc.).

Shall I file a bug report?

Oliver
« Last Edit: August 21, 2009, 06:08:47 pm by ofels »