-->
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: FetchMode strategy AGAIN
PostPosted: Thu Mar 17, 2005 9:48 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 9:24 am
Posts: 28
There is more than one topic about this kind of problem and no answer.
If the question is stupid or irrelevant, please let me know.

For the instance, it's causing me a BIG problem so I don't have any other choice than posting it again.

In Hibernate in Action, Chapter 7(7.3.2) it is suggested that if we want to disable outer joint fetching(using criteria api), we can call the setFetchMode("bids",FetchMode.LAZY) where bids is the associated object we don't want to carry up from the database.

I'm trying this feature and it's not working for me.

here is how I'm trying it:

Criteria criteria=session.createCriteria(TStructureLibelle.class);
criteria.setFetchMode("structure",FetchMode.LAZY);
criteria.add(Expression.eq("structure.codeStructure",codeStructure));
criteria.addOrder(Order.asc("dateFinValidite"));
return criteria.list();

I've been searching the list to find an eventual answer in vain.
So any help would be greetly appreciated.

Meissa


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.