Re: questions regarding prefetch

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Mar 15 2004 - 15:32:38 EST

  • Next message: Mike Kienenberger: "Including Mockrunner for unit testing in cayenne dev's otherlibs?"

    Tore,

    This has been fixed in CVS and will be a part of March 16th nightly
    build. I implemented an algorithm organizing all prefetch queries in a
    dependency tree to properly connect prefetched objects with each other.

    Prefetching is most efficient when all the intermediate paths are
    present (e.g. "editions" and "editions.updates"), however just using
    the longest path by itself ("editions.updates") will work, resolving
    to-many relationships of those Edition objects that are already in
    memory.

    Andrus

    On Mar 13, 2004, at 12:36 PM, Tore Halset wrote:
    > Hello.
    >
    > I am trying to track down a prefetch bug (CAY-105). All the prefetch
    > queries are done correctly, but it looks like a some of the toMany
    > relations are faulted even when it should contain data.
    >
    > It looks like toMany-relations with more than one step is not working.
    > Like addPrefetch("aToMany.bToMany).
    >
    > In SelectObserver.getResultsAsObjects(DataContext, Query) only
    > prefetchQueries with a singleStepToManyRelationship are merged with
    > SelectObserver.mergePrefetchResultsRelationships. Is that correct?
    >
    > Another question about prefetch. I see that PrefetchHelper are only
    > called from DataContext.prefetchRelationships, but that methode does
    > not seem to be called from anywhere. Are PrefetchHelper obsolete or am
    > I missing something?
    >
    > Regards,
    > - Tore.
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Mar 15 2004 - 15:32:44 EST