Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Fetchgroup usage / unfetched basic attributes

Hi Andrei,
1. simple example: I suppose, the cases where we get the basics loaded, are those without Fetchgroups so it fits to what you said.
2. what we are trying to do? Well, we migrated from JDO to JPA, and that's the default in JDO. In general, I am convinced that it would be a valuable feature to include the basic mappings in a default Fetchgroup which can be a starting point to enlarge. What is an entity without basics like Strings, Long, Integer?
Thanks a lot and best regards, Markus


-----Ursprüngliche Nachricht-----
Von: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] Im Auftrag von Andrei Ilitchev
Gesendet: Donnerstag, 1. September 2011 16:39
An: eclipselink-users@xxxxxxxxxxx
Betreff: Re: [eclipselink-users] Fetchgroup usage / unfetched basic attributes

Comments are inline.
On 9/1/2011 10:20 AM, Hahn, Markus wrote:
> Hi Andrei,
> thanks a lot. But then i dont understand why we have so many use cases where we define a Fetchgroup without basic attributes on a query, and despite of not included in the Fetchgroup they are loaded in the entities. What could cause this behaviour?
Could you please provide a simple example.
> And is there a convenient way to build a Fetchgroup including all the basic attributes?
I don't think there is anything like that.
What are you trying to do?
To always fetch all basic attributes just don't define them as LAZY - 
and you would not need any fetch group on queries.
And use a FetchGroup when you need to NOT fetch some basic attributes.
> Best regards, Markus
>
> -----Ursprüngliche Nachricht-----
> Von: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] Im Auftrag von Andrei Ilitchev
> Gesendet: Donnerstag, 1. September 2011 15:16
> An: eclipselink-users@xxxxxxxxxxx
> Betreff: Re: [eclipselink-users] Fetchgroup usage / unfetched basic attributes
>
> Hi Markus,
>
> If you don't use a fetch group with a query the only basic attributes
> that are NOT fetched are those defined as "fetch=LAZY".
>
> Alternatively, if you use a fetch group with a query the only basic
> attributes fetched are those included in the fetch group.
>
> Thanks,
> Andrei
>
> On 9/1/2011 6:14 AM, Hahn, Markus wrote:
>> Hi folks,
>> we use the EL Fetchgroup features and encounter some behaviour we cant
>> explain.
>> In many cases, EL works as expected concerning the basic mappings
>> (String, Long..): the attributes are fetched if they are not mapped as
>> "fetch=LAZY", independently of using a Fetchgroup on the query. Basic
>> mappings don't have to be included in the Fetchgroup.
>> In some cases, this does not work: the basic attributes are NOT loaded.
>> If we add them to our Fetchgroup, they are loaded.
>> Is it a bug? Does anybody has a hint how to solve this problem?
>> Best Regards, Markus
>>
>>
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top