persistence@glassfish.java.net

Re: Re2: Native Queries

From: Mitesh Meswani <mitesh.meswani_at_Sun.COM>
Date: Fri, 09 Dec 2005 12:08:01 -0800

Markus Fuchs wrote:

> Hi Mitesh,
>
> isn't the correspondence by name, i.e.
> @NamedNativeQueries references @SqlResultSetMapping by name?

That is correct. However, as there is no way to define an array of
SqlResultSetMapping, if all the NamedNativeQuery inside
NamedNativeQueries require distinct SqlResultSetMapping, we will need to
define them on some other java class/element. Which is not convenient.

Thanks,
Mitesh

>
> Thanks,
>
> -- markus.
>
> Mitesh Meswani wrote:
>
>> Hi Linda, Mike,
>>
>> It is possible to define an array of NativeQuery using
>> @NamedNativeQueries. However, there is no way to define corresponding
>> SqlResultSetMappings. Is this an oversite or there is a workaround
>> available that we are not aware of.
>>
>> Thanks,
>> Mitesh
>>
>> Shelly (Donna) McGowan wrote:
>>
>>> Mitesh,
>>>
>>> I didn't find that ability hence that's why I used three Orders so each
>>> one could be defined differently.
>>>
>>> Shelly
>>>
>>>
>>>
>>> Mitesh Meswani wrote On 12/08/05 20:53,:
>>>
>>>
>>>> Hi Shelly,
>>>>
>>>> Not directly related to the issues here. But, do you know if there
>>>> is any annotation that allows us to specify array of
>>>> @SqlResultSetMapping. I was trying to write bunch of
>>>> NamedNativeQueries but then got stuck at defining corresponding
>>>> @SqlResultSetMapping
>>>>
>>>> Thanks,
>>>> Mitesh
>>>>
>>>>
>>>
>>>
>>>