I have an entity with a finder method that takes a criteria and returns a List. The code generated in the daobase has the correct return type (List) but the generated code generates a compilation error due to the return type of the criteria's execute() method:
public java.util.List findUsersByCriteria(final int transform, final edu.duke.dcri.retinalscan.persistence.criteria.FindUsersCriteria criteria) { try { ... java.util.Collection results = criteriaSearch.execute(); transformEntities(transform, results); return results; } } The results of type Collection is trying to be coerced to a List and is causing the compilation error. The Queries section of the Spring Cartridge How-To shows a finder query returning a List given a criteria. It also appears as though the criteriaSearch.execute() is actually returning a HashSet which, as a side effect, can invalidate the result set ordering defined by the criteria. The conversion from the List returned by Hiberante to HashSet takes on set semantics which does not guarantee the ordering of elements when iterating over the set. _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2392#2392 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user