0
我在我的hbm.xml文件中添加了命名查詢,並且無法正常工作,如下面的代碼所示。像hibernate命名查詢
<query name="ca.getChildCategories"><![CDATA[
from category as ca where ca.name like :name
]]></query>
和我打電話它作爲
getHibernateTemplate().findByNamedQueryAndNamedParam("ca.getChildCategories" ,
new String[] { "name"},
new Object[] { likeKey});
應用程序無法UP。任何幫助將非常感激。
添加stacktrace pls。我猜你的課是'類別'不'類別' – Apostolos
檢查與'從類別ca在哪裏ca.name喜歡:名稱' – Apostolos
@Apostolos謝謝。這是我的錯誤。 :) –