I added named query in my hbm.xml file and is not working, as code below.
<query name="ca.getChildCategories"><![CDATA[
from category as ca where ca.name like :name
]]></query>
and am calling it as
getHibernateTemplate().findByNamedQueryAndNamedParam("ca.getChildCategories" ,
new String[] { "name"},
new Object[] { likeKey});
The application is not able to UP. Any help wil be very much appreciated.
请使用from Category ca where ca.name like :name
不使用as
写HQL查询时。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.