users@glassfish.java.net

Re: what datatype can em.createQuery().getResultList return?

From: <glassfish_at_javadesktop.org>
Date: Fri, 13 Jun 2008 07:39:54 PDT

Well, it returns a List of [i]something[/i], and that something is either an array of columns (if you did, e.g., SELECT x.id, x.name from X x) or an entity class (if you did, e.g., SELECT x FROM X x). (Sitting here, I can't remember what the elements of the list are when you select just one column--is it an array with size one, or is it just the scalar value? Don't remember.)

Hope that helps.

Laird
[Message sent by forum member 'ljnelson' (ljnelson)]

http://forums.java.net/jive/thread.jspa?messageID=280188