Hi all !
I have a query which worked fine until now:
Query dbQuery = em.createQuery("SELECT OBJECT(a) FROM TaskList AS a");
| List <TaskList> list = dbQuery .getResultList();
Now I need to change the query, just to restrict the query to a few fields from the
TaskList:
Query dbQuery = em.createQuery("SELECT taskId,taskName FROM TaskList AS a");
| List <TaskList> list = dbQuery .getResultList();
The problem is that now the list contains Objects and not TaskList......I need TaskList
otherwise I will have ClassCastExceptions in other pieces of the code......
is my syntax wrong or what else ?
Thanks a lot
marco
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217073#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...