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: [2.0] return count
PostPosted: Thu Jul 03, 2008 9:38 am 
Newbie

Joined: Wed Jul 02, 2008 7:54 am
Posts: 8
Location: Brussels
Hello,

I work with NHibernate 2. I have a class User and a class sales.

I want to retrieve my user and the number of sales he has in one query.

I don't want to load all his sales but only know if he has at least one sale.

How is it possible to do that? Is it possible to have the list of sales not loaded but have the property count or size initialized?

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 04, 2008 11:40 am 
Newbie

Joined: Wed Jul 02, 2008 7:54 am
Posts: 8
Location: Brussels
Ok it was a stupid question, no need to join the table. In all the case it give the size of the collection


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.