Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Eelco on December 01, 2005, 02:22:38 am
-
Currently, I'm working on a project where I transform a Platform Independent Model, to a DDL model. In this model, classes are transformed to tables, and attributes to columns.
Now, I need to set properties for the columns, such as default values, whether they can be Null or not, and Unique. Is there a way to do this with a transformation template, or add-in?
-
(Version used: 6.1 build 788)
I have the same problem. DDL default transformation is not generating values for unique and null attributes (they appear "blank" in properties dialog window) . The source of the generation is a class diagram.
When I try to generate DDL Script, it is wrong for these columns.
If I create a table manually and add columns to it, unique and null attributes are set to default values. DDL script generated is ok then.
For example:
(A)
(A.1) Table generated by DDL Transformation:
Table A
Column:
* Name = Title
* Type = VARCHAR2
* Length = 50
* Not null = <blank> !!
(A.2) DDL Script generated:
CREATE TABLE A (
Title VARCHAR2() NULL -- No length is set !!!
)
(B)
(B.1) Table created manually
Table B
Column:
* Name = Title
* Type = VARCHAR2
* Length = 50
* Not null = YES
(A.2) DDL Script generated:
CREATE TABLE A (
Title VARCHAR2(50) NOT NULL -- Length set ok
)
I suppose if I could set Not null attribute in DDL trasnformation template, then DDL script would be generated like if the table is created manually.
Any ideas?
Thanks
Pablo