Re: questions regarding prefetch

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Mar 17 2004 - 11:14:05 EST

  • Next message: Andrus Adamchik: "Re: Final optimistic locking patch available / CAY-52 attachments need deleting"

    I'll fix the ClassCastException, however real fix for prefetching over
    flattened relationships will require more thought.

    Andrus

    > On Mar 15, 2004, at 21:32, Andrus Adamchik wrote:
    >
    >> 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.
    >
    > Thanks a lot! You have indeed fixed prefetch of multistep toMany
    > relations.
    >
    > I think the fix introduced a bug. Or made a bug worse. As stated in bug
    > CAY-15, prefetching over a flattened many to many does not work. I do
    > not know if I should report this as a new bug, or append it to CAY-15.
    >
    > Adding a query.addPrefetch(String) over a flattended many to many used
    > (before nightly 2004-3-16) to leed to a correct prefetch query. The
    > problem was that the result from the prefetch query was not inserted
    > into the graph. (I have some huge flattened many-to-many).
    >
    > After 2004-3-16 I get the following exception:
    > Exception in thread "main" java.lang.ClassCastException
    > at
    > org.objectstyle.cayenne.access.util.SelectObserver.partitionBySource(Sel
    > ectObserver.java:236)
    > at
    > org.objectstyle.cayenne.access.util.SelectObserver$PrefetchTreeNode.reso
    > lveObjectTree(SelectObserver.java:403)
    > at
    > org.objectstyle.cayenne.access.util.SelectObserver$PrefetchTreeNode.reso
    > lveObjectTree(SelectObserver.java:375)
    > at
    > org.objectstyle.cayenne.access.util.SelectObserver.getResultsAsObjects(S
    > electObserver.java:187)
    > at
    > org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
    > :1200)
    >
    > Regards,
    > - Tore.



    This archive was generated by hypermail 2.0.0 : Wed Mar 17 2004 - 11:14:06 EST