persistence@glassfish.java.net

Re: native scalar SQL query and result list

From: Prashant Dighe <Prashant.Dighe_at_Sun.COM>
Date: Mon, 01 Jun 2009 11:04:47 -0700

Is this the right alias for TopLink related questions?
If not, can someone please point me to the right alias...

The reason I am asking is because I have one more question.

Thanks,
Prashant

Prashant Dighe wrote:
> Hello,
>
> Consider this native query,
> Query query = em.createNativeQuery("select ID, LASTNAME from User");
>
> The query.getResultList() method returns a List of Vectors using
> TopLink (JPA 1.0).
>
> Is this TopLink specific or a JPA spec defined behavior that it
> returns a List of Vectors?
>
> Thanks,
> Prashant
>
> p.s.
> In JSR 220, it says this, "Execute a SELECT query and return the query
> results as a List." but does not mention the type of objects.
> In JSR 317, it says this, "Execute a SELECT query and return the query
> results as an untyped List."
>