hi, all.
I am using jboss3.0.0+jetty, and I want to have a findby method to return top 10 rows in some order, but when I deployed onto jboss using the following descriptor in jbosscmp-jdbc.xml, it gave me an expcetion complaining about"...org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "weight" at line 2,column 113.Was expecting one of:<NUMERIC_VALUED_PATH> ...
<STRING_VALUED_PATH> ...
<DATETIME_VALUED_PATH> ...".
Any idea?
the part for this findby in jbosscmp-jdbc.xml is:
...
<query-method>
<method-name>findByDescriptionLike</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<jboss-ql>
<![CDATA[SELECT OBJECT(a) FROM Concept AS a WHERE a.description LIKE ?1 ORDER BY weight DESC ]]>
</jboss-ql>
...
Thanks,
hongmei
Try a.weight rather than just weight.