Author Topic: DDL transformation: Attributes do not transform  (Read 748 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Arenīt we all in the model business ?
    • View Profile
    • Karl Storz homepage
DDL transformation: Attributes do not transform
« on: February 13, 2010, 01:26:17 am »
Hi all.
Despite that it is a bit quiet around me due to work load, I filed a new bug:
=================
DDL transformation: Attributes do not transform correctly

Several issues came up when transforming class elements to table elements via DDL transformation templates.

- %attallowDuplicates% always returns an empty string even if in the attributes properties in the collection section the duplicates checkbox is ticked
- when applying %TRANSFORM_CURRENT()% without excluding the "containment" section a string "containment=" is created with no value. The "containment" keyword is unknown to the parser, even if the value is explicitely set to something like "1".
- It is unclear which keyword  in the DDL template will set the "Not Null" option of a column. There does not seem to be a allowDuplicates or nullable keyword available.

Reproduction:

Create a class with at least two attributes, of which one has set the Allow Duplicates option from the attributes properties (collection section in the Details tab)
Create a DDL transformation template which shall transform the class into a table.
The "Attribute" template contains a %TRANSFORM_CURRENT()% with no further parameter and a section in which %attallowDuplicates" is read and visualised.
Run the class through the DDL transformation using the template adapted.

Result: The parser stops after encountering the empty "containment=" entry.

Add a section with containment="1" to the template, rerun the transformation.
Result: The parser stops after encountering the containment="1" entry.

Add  "containment" in the exclusion list of the %TRANSFORM_CURRENT% macro
Rerun the transformation.

Result: Transformation runs through but %attallowDuplicates% returns an empty string for both attributes.
============

These seem to fall in the annoying not-thought-till-the-end section :P

Oliver