cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@xsinet.co.za
Subject Re: Prefetching Question
Date Fri, 07 Sep 2012 07:52:23 GMT
Ah :-)  I figured it out ... didn't know that one could 'flatten' class
field attributes as well:

Highlight the attribute in the class definition and click on the [I] icon
(Edit Attribute).  Then select the desired path.

Neat !

Thanks, great stuff.


> Thanks Ari, that works great.
>
> Say now the Paintings table or Hobbies table has a field eg: Notes
> that i'm interested in. Then flattening won't work i suppose ?
>
> How would you prefetch then, if no prefetching is done on the original
> Artist or Person query ?
>
> Thanks.
>
>
>> On 6/09/12 8:54pm, dollj@xsinet.co.za wrote:
>>> If for example i have the following classes: Person, Hobbies and Hobby
>>>
>>> Hobbies has fields:  personId and hobbyId
>>>
>>> If no prefetching is done on the original Person query, is there a way
>>> to
>>> prefetch Hobby when calling getHobbies() on Person ?
>>
>> Just flatten the join and simplify your code:
>>
>>    http://cayenne.apache.org/doc/flattened-relationships.html
>>
>>
>> Ari
>>
>>
>>
>> --
>> -------------------------->
>> Aristedes Maniatis
>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>>
>
>
>



Mime
View raw message