JPQL: The state field path cannot be resolved to a valid type

前端 未结 3 1267
孤街浪徒
孤街浪徒 2021-02-15 18:49

I can\'t make this query work:

Query query = eManager.createQuery(\"select c FROM News c WHERE c.NEWSID = :id\",News.class);
        return (News)query.setPara         


        
3条回答
  •  日久生厌
    2021-02-15 19:11

    entity have persistent attribute named newsId.but in query you have used NEWSID . try with this

    select c FROM News c WHERE c.newsId = :id
    

提交回复
热议问题