Re: Paged Queries Implemented

From: Andrus (andru..bjectstyle.org)
Date: Thu Sep 19 2002 - 00:53:34 EDT

  • Next message: Holger Hoffstätte: "More deprecated methods"

    Initial success with this feature (it still requires some cleanup of
    course) got me thinking. Maybe we can implement lazy fetching of "to-many"
    relationships. This is going to be even cooler than EOF batch faulting.
    Besides it solves an inherent reciprocal relationship problem:

    DataObject.setToOneTarget() in Cayenne or
    EOEnterpriseObject.addObjectToBothSidesOfRelationshipWithKey() in EOF

    would both trigger a fetch of reverse to-many relationship. This is
    especially painful when this is a "one-to-tens of thousands" relationship.
    Using lazy fetching of to-many relationships will alleviate this problem in
    90% of the cases.

    This can be a setting in the data map on the ObjRelationship, like
    "pageSize", defaulting to zero, meaning no pagination.

    Any ideas?

    Andrus

    At 01:42 AM 9/18/2002 -0400, Andrus wrote:
    >A little announcement - a feature needed long time ago finally has been
    >implemented.
    >
    >I am talking about the ability to do on-demand object list pagination
    >(resolving objects one page at a time) for big queries. I just checked in
    >the first working implementation. Using it is as easy as doing:
    >
    >query.setPageSize(60);
    >
    >Everything else is transparent and is handled by Cayenne. More details in
    >CVS version of User Guide, section 5.8.4. One thing to mention -
    >preliminary test results show 5x - 7x speed increase when fetching a
    >relatively large result set (2000 objects).
    >
    >Enjoy.
    >
    >Andrus



    This archive was generated by hypermail 2.0.0 : Thu Sep 19 2002 - 00:53:05 EDT