[ http://jira.andromda.org/browse/SPRING-90?page=history ] Work on SPRING-90 started by Chad Brandon
> Criteria searches do not allow Lists to be returned and sort ordering not > being preserved > ----------------------------------------------------------------------------------------- > > Key: SPRING-90 > URL: http://jira.andromda.org/browse/SPRING-90 > Project: Spring Cartridge > Type: Bug > Versions: 3.1RC1 > Reporter: Lee Greiner > Assignee: Chad Brandon > > 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. -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- 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-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-devel
