users@glassfish.java.net

Vector returned by getSingleResult if query is native

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Sep 2008 01:33:50 PDT

Hi,
If a native query is like "SELECT TRUE FROM DUAL", the object returned from getSingleResult is a Vector containing a single Boolean object.
It is not clearly defined in the spec what to expect from getSingleResult if the query is native. With JPQL, I can always cast the returning object to the expected target entity class.
Why the discrepancy?

Thanks.
[Message sent by forum member 'phuihock' (phuihock)]

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