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 use "filter()" to get the size of a lazy co
PostPosted: Tue Dec 16, 2003 2:38 pm 
Beginner
Beginner

Joined: Thu Sep 04, 2003 1:46 pm
Posts: 20
Hi,

The hibernate docs mention that I can use the "filter()" method to compute the size of a lazy loaded collection without initializing the collection.

According to the docs, this line of code will do this:

( (Integer) s.filter( collection, "select count(*)" ).get(0) ).intValue()

This, however, does not compile because Session.filter() returns a Collection which does not have a "get()" method.

Am I missing something?

Thanks,
-Ben


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2003 6:45 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
http://hibernate.bluemars.net/118.html#A3 ?

_________________
Cheers,
Shorn.


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.