-->
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.  [ 1 post ] 
Author Message
 Post subject: Make <Many-to-one> mapping as lazy in Hibernate 2.0
PostPosted: Mon Jul 24, 2006 11:35 am 
Newbie

Joined: Mon Jul 24, 2006 11:27 am
Posts: 1
Hi,
I am using Hibernate 2.0 and in Object HBM file I have set many-to-one relationships for multiple objects.
When I load my object, all related many-to-one objects are loaded which I don’t want specially when i am just showing list of Objects with ID and Name only.

Thus I want to Lazy initialize my Many-to-one relationship, so that these objects are not loaded until explicitly asked. I went through 2.0 DTD and could not find any method to do that.

Lack of making Many-to-one as lazy is hampering performance of my project.

Any direct or alternative method to make the relationship lazy is really appreciated.

BTW, very nice product...:)

Vishol


Hibernate version:Hibernate 2.0

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:MYSQL 7.0

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

_________________
Vishol


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.