Hi, i have a question concerning the method "getSingleResult()". The intended behaviour of the method was up to today, that if the underlying query returns more than one result, the mthod returns the first of them. Only in case of no results, a NoResultFound Exception is thrown.
But, as we found out today, when there are at least two results we get a NonUniqueResultException. Is this new? Our JBoss is 4.0.5-GA. And why can't this method just behave as expected? the workaround would be | em.createQuery("SELECT Object(o) FROM MyEntity o").setMaxResult(1).getSingleResult(); any ideas? martin View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027438#4027438 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027438 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user