Re: Sorting and Pagination in Many-to-Many relationship

From: Nishant Neeraj (nneeraj12..ahoo.com)
Date: Sun Sep 13 2009 - 05:00:23 EDT

  • Next message: Borut BolĨina: "Using Cayenne Servlet Filter can bring the web application down"

    the DB relationship model is     

    http://i30.tinypic.com/jaz4wm.jpg
    - Nishant

    --- On Sun, 13/9/09, Nishant Neeraj <nneeraj12..ahoo.com> wrote:

    From: Nishant Neeraj <nneeraj12..ahoo.com>
    Subject: Sorting and Pagination in Many-to-Many relationship
    To: "Cayenne Mailing List" <use..ayenne.apache.org>
    Date: Sunday, 13 September, 2009, 2:25 PM

    I am having problem in sorting and paginating  many to many relationship objects.
    Here is the DB relationship model.  http://i30.tinypic.com/jaz4wm.jpgI want to do Readers.getMagzines() that returns paginated resultset of page size, N.

    I write a Readers.getMagzine() Method that pulls out List of subscriptions. In the method, I iterate through the list and inflating Magzines (subscriptions.getMagzines()) and injecting SubscriptionType to magzine object. And then I return the list. This works fine.
    Now, I do not want to pull out the full list. Rather, I want do it page by page sort by say, MagzineName with page Size N. Not sure how to do it. Can some one give a hint?
    ThanksNishant

          Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com See the Web&#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/



    This archive was generated by hypermail 2.0.0 : Sun Sep 13 2009 - 05:00:58 EDT