-->
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.  [ 5 posts ] 
Author Message
 Post subject: Query Sample Code
PostPosted: Thu Mar 23, 2006 10:50 am 
Newbie

Joined: Sat Feb 25, 2006 3:30 pm
Posts: 13
What I am really trying to do is to write my first query. Where do I start.

It's not technically my *first* query. I've been using session.CreateCriteria with UniqueResult and with List, but the documentation says that is an experimental interface and that the stand Query is preferred.

Can someone point me to sample code using the QuerySelect class or the SqlSelectBuilder, or other classes in the SQLCommand namespace in NHibernate.

Thanks,
Steve Brennan
St. Louis, MO


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 12:18 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
The standard docs have some examples. http://www.hibernate.org/hib_docs/nhibernate/html/

http://www.hibernate.org/ForumMailinglists/HowToAskForHelp [/url]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 2:45 pm 
Newbie

Joined: Sat Feb 25, 2006 3:30 pm
Posts: 13
k-dub wrote:
The standard docs have some examples. http://www.hibernate.org/hib_docs/nhibernate/html/


I disagree that the standard document at http://www.hibernate.org/hib_docs/nhibernate/html_single/ contains samples of queries that coded without using CreateCriteria.

Thanks anyway,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 2:58 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
You're totally right, those docs don't have any HQL queries. I apologize.

It's the *Hibernate* docs that have query examples. The syntax is so close to being identical that it didn't make sense to duplicate it into the NHibernate docs.

http://www.hibernate.org/hib_docs/reference/en/html/manipulatingdata.html#manipulatingdata-querying


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Thu Mar 23, 2006 3:20 pm 
Newbie

Joined: Sat Feb 25, 2006 3:30 pm
Posts: 13
The query documentation page you linked to is great!

Thanks,
Steve


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