-->
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: Lazy, the Criteria API and complex where clauses
PostPosted: Sun Nov 12, 2006 11:31 pm 
Newbie

Joined: Thu Nov 09, 2006 3:08 am
Posts: 3
Hi there, I'm having problems getting hibernate to lazy load.

I'm finding that lazy loading is working fine when I do a load by id. Eg, loading by the primary key,
Code:
CandidateVo cand = (CandidateVo) getHibernateTemplate().get(
            getVOClass(), registration);


Now comes my problem, I find that when I start to introduce sub criteria, that is criteria on relationships, that the lazy loading is discarded and the properties are loaded eagerly in the same sql statement. Only the properties that belong to the relationship references in the criteria are eagerly loaded.

Is this expected behavior?

I've specified in my mapping xml that lazy="true" and fetch="subselect" on the relationship which is a set.

Any direction would be appreciated.


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.