可以說,我有我的豆表test
與id
列和name
訪問使用UI本地查詢列表:重複
我得到這個查詢
public List getTestList(){
Query q = em.createNativeQuery("select * from test");
List list = q.getResultList();
return list;
}
和我的JSF頁面上,我有:
<ul>
<ui:repeat id="resulta" value="#{testController.testList}" var="item">
<li>#{item.id}</li>
</ui:repeat>
</ul>
爲什麼我得到一個SEVERE: javax.el.ELException: /test.xhtml: For input string: "id"
嗨,其實我需要它nativeQuery,因爲我需要類似''select t。*,nt.name from test'作爲t Inner加入newTest as nt「' – galao 2013-05-03 06:02:01
@galao試着描述你的實際問題,它誤導人們,浪費時間在兩邊。類似的,可以參考這裏 - http://stackoverflow.com/a/4536802/366964 – 2013-05-03 06:09:20