Book a Demo

Author Topic: DDL generation: Set Initial, Not Null and Unique  (Read 3314 times)

Eelco

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • d'Oh
    • View Profile
DDL generation: Set Initial, Not Null and Unique
« 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?
« Last Edit: December 01, 2005, 04:45:32 am by Eelco »

pyanguas

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: DDL generation: Set Initial, Not Null and Uniq
« Reply #1 on: March 08, 2006, 08:30:42 am »
(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

« Last Edit: March 08, 2006, 08:31:41 am by pyanguas »