native scalar SQL query and result list

View: New views
3 Messages — Rating Filter:   Alert me  

native scalar SQL query and result list

by Prashant Dighe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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."


Re: native scalar SQL query and result list

by Prashant Dighe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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."
>


Re: native scalar SQL query and result list

by Marina Vatkina :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, you can ask your questions here.

Regards,
-marina

Prashant Dighe wrote:

> 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."
>>
>