File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Optimum Hibernate Mapping for a Tree Model

 
vijayender madura
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to Hibernate and i want to know which is the optimum technique(in terms of performance) to retrieve data in a tree model.
To illustrate:-

Product Table:
|productId| productName| Description| parentproductId|

I need to map this table to a product Class as follows:-



My Product table has loads of columns in addition to description and loads and loads of records too! What would be an optimum Hibernate mapping technique to retrieve the entire tree.

Note: There will be only one root product whose parentProductId would be null in the table.

Any help will be appreciated. Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic