cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <johnth...@gmail.com>
Subject Re: Batch fetching relationships
Date Fri, 15 Aug 2014 20:34:21 GMT
Cayenne's prefetches give you more options, specifically the *disjoint*
prefetch type.  If you batch relationship fetching is in the same place as
the query this is the best way to translate it.

However, if your batch relationship fetching is elsewhere where the query
isn't available, currently I don't think there are any utilities to do
this.  It's not a complicated thing to do, but someone needs to write it.

John


On Thu, Aug 14, 2014 at 7:24 PM, Lon Varscsak <lon.varscsak@gmail.com>
wrote:

> So, I'm working on porting some things over from EOF/WO/WOnder to Cayenne
> and want to understand what my options are for batch fetching
> relationships.  I understand prefetching, but we have SO many places where
> we don't prefetch (let's pretend for a valid reason :D) and we have an
> array of CayenneDataObjects and we know we're going to access the "x"
> relationship on all of those items.  In WOnder we had an
> ERXBatchFetchUtilites class that would take an EO or an array of EOs and
> then specify one or more key paths which would then trigger batched fetches
> of the given relationships.
>
> Is this something that's available in Cayenne?
>
> -Lon
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message