Schema in DDL generation

General discussions about code engineering

Moderator: Moderators

Schema in DDL generation

Postby gregsoulsby » Mon May 20, 2013 1:59 am

I am generating from UML to MySQL DDL.

The index code generated is of the form:


where p1 and p2 look like schema of some sort.

This fails in MySQL with invalid SQL on the p1.p2. It runs without error when I delete the p1.p2.

What are these schema and what is the approach to getting MD to generating the DLL to run in MYSQL without editing?

Forum Newbie
Forum Newbie
Posts: 4
Posts Rating:0
Joined: Fri Jan 27, 2012 4:33 am

Re: Schema in DDL generation

Postby TomasJkn » Mon May 20, 2013 7:32 am

Hello Greg,
Yes you are right - these are supposed to be schema names. However there is a problem in the qualified name generator - it mistakenly takes too much upstream packages when generating schema names. It should be just one level: ** where *p2* is the schema name (if any) and *abc* is the table name.

To work this around switch off the *Generate qualified names* option in the code generator; this will make the generated index names unqualified; in your case this will result in the following SQL:
CREATE INDEX fk_xyz ON abc(fk_def);

Rightclick your code engineering set>Properties>Generation Features>Generate qualified names, set to false.

Tomas Juknevicius
Tomas Juknevicius
Senior Systems Analyst
No Magic Europe
Customer Support
Customer Support
Posts: 63
Posts Rating:6
Joined: Mon May 10, 2010 9:24 am

Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests