-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to improve performance in my case?
PostPosted: Mon Feb 09, 2004 6:18 am 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
In my application, there is a confused problem. There are two tables (A,B). Association like one-to-one, many-to-one is exist. But in application, some query need infomation from two tables and the other only need infomation of table A. If I config the association in hbm and java class, hibernate will select two tables all columns for me. But sometime I only need little column. My question is how to improve performance? I want hibernate select columns I need, at least, not to select columns of table B when I don't need infomation from table B. Now I config two hbm to one table. Is it a good way to solve my problem? Or is there any better way, pattern exist?
By the way, I don't understant "Three different O/R mapping strategies" well. May somebody explain it detail?
http://www.hibernate.org/4.html#A18


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 6:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use lazy="true" for your associations. Then use join fetch in HQL to override lazy loading behaviour.


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

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.