Announcement Announcement Module
Collapse
No announcement yet.
Hibernate : One to Many Relation , Pagination when fetching associated entities Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Hi!

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

    That url might be usefull.


    -Kaj

    Comment


    • #3
      Thanks

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

      Comment

      Working...
      X