-->
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: Problem with FetchMode.SELECT on DetachedCriteria
PostPosted: Sun Oct 01, 2006 10:40 pm 
Newbie

Joined: Sun Oct 01, 2006 10:35 pm
Posts: 9
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.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:
DB2 UDB for z/OS
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

I am setting FetchMode.SELECT using .setFetchMode() on a DetachedCriteria query. But hibernate ignores it and fetches all the associated objects, which I do not need. I cannot specify this in .hbm.xml files. So, please let me know, how can I do it dynamically.

Thanks
Krishna


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 11, 2006 5:19 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
setFetchMode() with FetchMode.SELECT should work. I just verified it and could make it work as expected.

Maybe you could post the code you use so as we can help, if necessary cause your post is already quite old :-).

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.