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

Wouter Zoons reassigned SPRING-137:
-----------------------------------

    Assign To: Wouter Zoons  (was: Chad Brandon)

> 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 SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

Reply via email to