[ http://jira.jboss.com/jira/browse/EJBTHREE-40?page=history ] Bill Burke closed EJBTHREE-40: ------------------------------
Resolution: Rejected EJBQL does not support expressions within the select statement SUM(foo) is ok (SUM(foo) * 1.0) is not. > SUM function in Query produce an Integer and not a Double > --------------------------------------------------------- > > Key: EJBTHREE-40 > URL: http://jira.jboss.com/jira/browse/EJBTHREE-40 > Project: EJB 3.0 > Type: Bug > Versions: Preview 3 > Reporter: Sorin Alexandru Constantinescu > Assignee: Bill Burke > > > I have an persistent object Container that contains: > private double buying_price; > private double selling_price; > private Date eta; > I try next query in EJB3: > select new Report(year(pers.eta),month(pers.eta), > sum(buying_price*1.0),sum(selling_price*1.0)) from Container as pers group by > year(pers.eta),month(pers.eta); > This sum function produced an Integer object and not a Double -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/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: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development