manageable with non list collection types -----------------------------------------
Key: EJB-107 URL: http://jira.andromda.org/browse/EJB-107 Project: EJB Cartridge Type: Bug Environment: Andromda 3.3 with Ejb3 Cartridge Reporter: Luca Dall'Olio Assigned to: Vance Karimi When adding the manageable stereotype in an ejb entity bean, generated code will not compile, I tried to track the problem down and it seems to me that the ManageableServiceBase.vsl velocity template will not handle a map collection type : final java.util.List<${member.type.fullyQualifiedName}> $memberEntityName = ($member.name != null && ${member.name}.length > 0) ? this.find${member.type.name}ByIds($member.name) : java.util.Collections.EMPTY_LIST; .... entity.${member.setterName}(${member.getCollectionTypeImplementation($memberEntityName)}); This generated code cannot compile, since it will assign a List to a Map : final java.util.List<sample.Organization> organizzazioniEntities = (organizzazioni != null && organizzazioni.length > 0) ? this.findOrganizzazioneByIds(organizzazioni) : java.util.Collections.EMPTY_LIST; if (organizzazioniEntities != null) { entity.setOrganizzazioni(new java.util.HashMap<java.lang.String, sample.Organization>(organizzazioniEntities)); } This issue has been discusses in this forum post : http://galaxy.andromda.org/forum/viewtopic.php?t=5716 -- 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 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone