1 Reply Latest reply on Dec 22, 2007 7:27 AM by Roberto Valentini

    Doubt about EntityManager.getResultList result

    Roberto Valentini Newbie

      Hi everyone,
      I have a doubt about the result of a query.
      I have a table like User(id,name,surname,phone) and i want to query this table in my EJB in this way:

      List res = em.createQuery("select u.id, u.name from User u where u.phone='555321').getResultList();

      What kind of object there are inside res?
      I have tryed to cast res in a List but it doesn't work.

      How can i do to access the data in res list??

      Thanks to all.