-->
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.  [ 3 posts ] 
Author Message
 Post subject: hql issue
PostPosted: Tue Jun 26, 2007 2:37 am 
Newbie

Joined: Fri Jun 15, 2007 1:15 am
Posts: 5
I've the next hql:
IQuery query = session.CreateQuery("select State from StateProv as State inner join State.Adrese as adresa where State.StateProvCode='93' and adresa.City='Drancy'");
ArrayList lista =(ArrayList) query.List();
The issues is even tough in profile i see the rigth query in my array list i 've not got the objecte filtered after the second critirium i mean adresa.City='Drancy', and i cant figure this out.

Can you help me with this please?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 26, 2007 1:45 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
In general, you can't load an object's collection filtered - it will always contain all elements it's supposed to contain. You can instead change your query to return the individual objects (addresses in your case).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 26, 2007 2:48 pm 
Newbie

Joined: Fri Jun 15, 2007 1:15 am
Posts: 5
Thanks
But can i achived my goal i mean to filter that data set after an adress field in my case city for instance.
I'm tring to understand how nhibernate works to descover it please scuze me my insistastion
Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.