Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: sgs32r on April 03, 2008, 02:12:00 am

Title: Association class and DDL
Post by: sgs32r on April 03, 2008, 02:12:00 am
Hello,

I'm a french newbie and I'm a problem with DDL Transformation.
When I create an association class (A) between two classes (B,C). The DDL transformation create four tables : one table by classes and a table to join B and C.

What is a problem for me, I would like only three table.

Someone would have a solution ?
Title: Re: Association class and DDL
Post by: «Midnight» on April 03, 2008, 02:18:10 am
Think about what your association class represents. If there are any possible many-to-many relationships, perhaps the join table is actually doing what you want.

If there are not, you need to somehow ensure that the associations are clearly defined as one-to-one, and the attributes are somehow unique.

I don't know if the automatic DDL transform will pick this up, but perhaps it will.
Title: Re: Association class and DDL
Post by: Eve on April 03, 2008, 08:05:09 am
The code and transformation templates do not currently determine the difference between an association class and a completely seperate class and association.

Handling of this is on our to-do list.
Title: Re: Association class and DDL
Post by: «Midnight» on April 03, 2008, 08:55:50 am
Quote
...
Handling of this is on our to-do list.
As are so many things Simon.

Please don't take that the wrong way! It's just that the size of EA necessitates a broad front. So...

Any idea where on the list it is? I'm not looking for a definite commitment here - unless it's in the hopper now, so to speak - but some idea if we (the community) should be writing our own functions to do this. If this looks like it will come out in the pre 7.5 timeframe then it would likely be best to wait.

David
Title: Re: Association class and DDL
Post by: Eve on April 03, 2008, 10:11:55 am
I really can't say anything more than it's not one of my immediate priorities.
Title: Re: Association class and DDL
Post by: sgs32r on April 03, 2008, 06:32:51 pm
If the code and transformation templates do not currently determine the difference between an association class and a completely seperate class and association, this means that most of the DDL gererated will be false  :-/.

Have you an idea ?

I have another question: When I delete a class and that reexecute the "DDL transformation", the corresponding table is not removed. What solution to this problem ?
Title: Re: Association class and DDL
Post by: Eve on April 04, 2008, 08:40:06 am
The solution is to manually delete the transformed class.  It can't be done automatically because EA doesn't assume that all classes need to be transformed at once.
Title: Re: Association class and DDL
Post by: Geert Bellekens on April 04, 2008, 04:52:47 pm
I guess the options you have are:

1. Wait for Sparx to fix this
2. Write your own DDL generator
3. Avoid using association classes. At a former client we had to stop using association classes as well because their generator couldn't handle it. It's annoying, but quite possible. Each assocation class becomes a normal class with associations to the two classes. Just make sure you get the constraints right.
Title: Re: Association class and DDL
Post by: sgs32r on April 04, 2008, 05:19:51 pm
Thank you for your response and your help