Hibernate Books

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Scenario Based Mapping (One Table Multiple Scenario)
PostPosted: Mon Feb 27, 2012 7:41 am 
Newbie

Joined: Mon Feb 27, 2012 7:37 am
Posts: 1
Suppose I have an Order table with 50 columns and I have an Order class with 50 properties and mapped with each other in hibernate file. I just want to show order list to the user which may have at most 3 to 4 columns like order_id, date, placed_by and order_amount. My problem starts here... when I load rows through the class, all 50 columns will be loaded along with the required just 4 columns which may impact the performance significantly. And sometime I want to load one (1) order with say 20 columns and sometime want to load a complete order with 50 columns. How can I map these three (3) different scenarios.

Thanks in advance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.