[ http://jira.andromda.org/browse/EJB-88?page=comments#action_15820 ]
Razvan Popovici commented on EJB-88: ------------------------------------ I have the same problem, on ordered relation the generated code is not only wrong but it doesn't compile: found : java.util.ArrayList<..> required: java.util.Set<..> Please note, Set does not maintain the order of the objects stored. Since the patch was provided, so no work is necessary, I am wondering why the administrators of the project are not applying this patch to the sources. I am using maven and I rely on binaries. Now I will have to download the sources, apply the patch, compile, publish a new ejb-cartridge version, 1.0-SNAPSHOT-EJB-88 in my own repository. This will only work on my machine, anybody from the team will have to do the same work again if they want to generate the code. > Various improvements and bug fixes > ---------------------------------- > > Key: EJB-88 > URL: http://jira.andromda.org/browse/EJB-88 > Project: EJB Cartridge > Type: Bug > Reporter: Sverker Abrahamsson > Assignee: Vance Karimi > Priority: Minor > Attachments: andromda-ejb3.patch > > This is a patch that contains some small bug fixes and improvement that has > been collected over the last months. Sorry for one file containing all bur > I'll describe the changes here: > There were a couple of places that had statements like this: > if(BooleanUtils.toBoolean( > > (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_BIJECTION_IN_CREATE, > true))) > Well, if the tagged value isn't set this statement doesn't have the intended > function. Affected files: > cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionAttributeFacadeLogicImpl.java > cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java > cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionOperationFacadeLogicImpl.java > Seam component roles were implemented in back end but not in templates as it > was a bit complicated. I've made a new implementation in back end that makes > the template much easier. Note! Two attributes must be removed from UML > model, those are seamComponentRoleNames and seamComponentRoleScopeTypes and > instead seamComponentRoles should be added. > Affected files: > cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl > When having association ends to be ordered, the code is generated with List > implementations (ArrayList). However, the interface used on the getter/setter > method parameters is java.util.Set so the code won't compile. I've changed > the default collection interface to be java.util.Collection instead of > java.util.Set in > cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml > Compiler warnings are supposed to be an indication that something could be > wrong with the code even though it compiles. It's good practice to solve > those warnings. However, now with generics each untyped collection cause a > warning which might hide real problems (have happened to me a couple of > times). There were already @SuppressWarnings annotations at some places in > the templates but I've walked through the files and added that where it was > missing. I've also changed some iterations to use foreach statements. > Affected files: > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Enumeration.vsl > Sometimes I want to set default values on attributes in uml model. That > support wasn't implemented in templates so > I added it on both entities and session beans. > Affected files: > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl > Support for @WebRemote annotation wasn't implemented in template, added it to > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionLocal.vsl > A very minor fix, on these files it wasn't correctly stated in the header > which template had been used to generate file > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoImpl.vsl > cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl -- 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 ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB