[ http://jira.andromda.org/browse/SPRING-137?page=comments#action_14280 ] 

Cyril Combe commented on SPRING-137:
------------------------------------

Those missing checks (collection type for association) are also responsible for 
the bug submitted in this forum thread:
http://galaxy.andromda.org/forum/viewtopic.php?t=4479

> Many-to-many association and map association
> --------------------------------------------
>
>          Key: SPRING-137
>          URL: http://jira.andromda.org/browse/SPRING-137
>      Project: Spring Cartridge
>         Type: Bug

>   Components: CRUD
>     Versions: 3.1
>  Environment: AndroMDA 3.1, MagicDraw 9.5, Maven 1.0.2
>     Reporter: Sebastien Arbogast
>     Assignee: Wouter Zoons

>
> I've got 2 entities, let's say A and B, associated together with a 
> many-to-many (0..* - 0..*) association. But the B association end is tagged 
> to be defined as a map (@andromda.hibernate.collection.type=map). When I try 
> to compile that model, I get 5 compilation errors in 
> $PROJECT_HOME$/core/target/src/$MY_PACKAGE$/crud/ADaoBase.java
> and $PROJECT_HOME$/core/target/src/$MY_PACKAGE$/crud/BDaoBase.java because of 
> lines where the add method is called on a Map instance.
> Before that, the association between A and B was one-to-many and I had no 
> problem. 
> I think I found the incriminated lines (in AndroMDA 3.1 sources) in the 
> templates but I can't figure out how to correct them :
> - In 
> cartridges\andromda-spring\src\templates\spring\crud\SpringCrudDaoBase.vsl, 
> line 102, there should be a test to check the type of the corresponding 
> association, and if it is a Map, one should replace the "add()" call by a 
> "put()" which implies that we must be able to get the key value somewhere
> - In 
> cartridges\andromda-spring\src\templates\spring\crud\SpringCrudServiceBase.vsl,
>  line 164, there should be a test on the association type too.

-- 
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