JBoss 3.2.1 is based on EJB 2.0. ORDER BY was introduced with EJB 2.1 which is supported by JBoss 4.0.
Maybe this is your problem.
Maybe it is, but in this same forum I have found several messages from 2001 and version 2.4 about the fact that the 'order' -tag did not work in certain jboss version for the findAll() method. So I assume it is supported in 3.2.1.
Can anyone confirm this?
Anyone an idea whether sorting is possible in finders?
I keep searching the newsgroups but can only find people using it successfully.
Is it maybe not working on jBOSS 3.2.1 in combination with MySQL?
Any help is very welcome.
I'm not sure if this answers your question, but Jboss 3.2 does support order by (although I haven't messed with jaws.xml) - the way I did it was to override my definition in ejb-jar.xml by inserting an identical definition in jbosscmp-jdbc.xml with one change - replace the <ejb-ql> tag with a <jboss-ql> tag.
In the jbosscmp-jdbc.xml file, you need only replicate the , <ejb-name> and part of the corresponding ejb-jar.xml entry for your EJB.
I have order by working fine with MySQL on jboss 3.2.0. If only COUNT() worked too...
You can modified the jbosscmp-jdbc.xml in tag add definition of ejb-jar.xml the and repleace <ejb-ql> for <jboss-ql> and modified the select sentences and ready to work.
<![CDATA[SELECT OBJECT(o) FROM obj o]]>
<![CDATA[SELECT OBJECT(o) FROM obj o ORDER BY o.fld1]]>