[ http://jira.andromda.org/browse/HIB-184?page=comments#action_13701 ] 

Diane Yang commented on HIB-184:
--------------------------------

I'm using AndroMDA 3.2 final, so I believe the template has the patch applied, 
but I still have duplicate columns under the situation described. The column 
names do have the entire ancestor path, but on the last reference to the second 
level embedded value, the property name is not appended to the columns, so the 
columns for that last reference all have the same name.

I have two instances of this in my model. In one case, the second level 
embedded value is referenced twice, and in another case, the second level 
embedded value is referenced three times. In the first case, the first 
reference is fine, and in the second case, the first two references are fine. 
It is only the last reference that ends up with the same column names.

> Duplicate Column names generated if EmbeddedValue containing another 
> EmbeddedValue is referenced twice
> ------------------------------------------------------------------------------------------------------
>
>          Key: HIB-184
>          URL: http://jira.andromda.org/browse/HIB-184
>      Project: Hibernate Cartridge
>         Type: Bug

>     Versions: 3.2-RC1
>  Environment: All
>     Reporter: Ronald Tschalär
>     Assignee: Carlos Cuenca
>      Fix For: 3.2-RC1
>  Attachments: hibernate.patch.zip, hibernate_bug.jpg
>
> Assume you have an Entity A with two attributes, a1 and a2, both with
> the same type which is an EmbeddedValue B; furthermore, assume that B
> contains an attribute b1 of type another EmbeddedValue C (with some
> attribute c1). Andromda will then generate two columns in the
> hibernate descriptor for a1.b1.c1 and a2.b1.c1 but give them both the
> same column name b1.c1 .
> The problem is that the prefix used for to generate the column names
> only contains the parent-attribute's name, but needs to include the
> complete ancestor list in order to make it unique. Attached is a
> simple patch, plus modified test case (see the SecondLevelEmbeddedType
> class).
> Attached is also a diagram excerpt from the test-case showing the
> three relevant classes. Before the patch the column names generated
> were both ATTR4_ATTR, and with the patch the names are
> FIRST_EMBEDDED_ATTR4_ATTR and SECOND_EMBEDDED_ATTR4_ATTR.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to