-->
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: Problems writing a query in HQL
PostPosted: Thu May 19, 2011 9:21 am 
Newbie

Joined: Fri Jun 26, 2009 2:22 pm
Posts: 6
I have an hql statement I'm trying to write that's a beyond the normal scope of stuff I've written todate using NHibernate. I was able to write the statement in normal MSSQL but realized I don't know how to do it in HQL. I have an object called A which has a collection of B objects. B has a property called C. I'd like to be able to get all of the A's that have B.C = 'qwerty'. When I CreateQuery and do a "FROM A a WHERE a.Name = 'asdf'" I get back a fully populated A with a collection of B's. When I saw that I thought I probably didn't need a join since NHibernate was seeing the connection. I'm extremely stumped. If anyone has an idea I'd love to hear it - thanx!


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.