-->
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: Query fields
PostPosted: Thu Mar 30, 2006 2:21 pm 
Beginner
Beginner

Joined: Mon Mar 06, 2006 2:19 pm
Posts: 42
Location: Belo Horizonte, Brazil
Does NHibernate only work with "Select *" or I can get only the fields that I want to work with. And, if possible, what happens with the object fields that are not specified in the query? I tried to use CreateSqlQuery but coudnĀ“t make it work like this.

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 3:26 pm 
Newbie

Joined: Sun Sep 25, 2005 9:11 am
Posts: 13
Location: Bergen, Norway
You must create a constructor on your objects that takes parameters and use the "select new" clause.

Check out the documentation: http://www.hibernate.org/hib_docs/nhibe ... hql-select[/quote]


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.