Results 1 to 3 of 3

Thread: Hibernate : One to Many Relation , Pagination when fetching associated entities

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    22

    Default Hibernate : One to Many Relation , Pagination when fetching associated entities

    I have two classes A and B both are participating in one-to-many relationship

    Class A
    {
    .....attributes;
    //Signifies One to Many RelationShips
    Set Bs = new HashSet();
    }

    Class B
    {
    ...attributes;

    }

    Assume that iam using lazy loading (i.e the associated entities are fetched on Demand)

    A a1; B b1;
    Assume for a particular instance a1 (type A)has association with 1000 B type entities in the database.

    Is it possible to fetch the associated B type entities in sizes of 15,15,15;

    (i.e) While accessing the 1st association of type B in a1 it should fetch 15(B entites)
    While accessing the 16th association of type B in a1 it should fetch 16..30

    Is it possible to implement the above in Hibernate?

    I read the fetching strategies (chapter 19 Improving performance) in the Hibernate documentation but i could not able undestand?

    Can any one please guide me in resolving the above issue?

  2. #2
    Join Date
    Oct 2004
    Posts
    151

    Default

    Hi!

    Please take a look at http://raibledesigns.com/wiki/Wiki.j...natePagination

    That url might be usefull.


    -Kaj

  3. #3
    Join Date
    Jul 2007
    Posts
    22

    Default Thanks

    Thanks i will go through the above link and post any usefull finding here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •