-->
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: SQL Server queries
PostPosted: Tue Jun 13, 2006 10:44 am 
Beginner
Beginner

Joined: Wed Apr 26, 2006 4:12 am
Posts: 29
I want to do a query against some of my entities, but in the SELECT clause I want to have the freedom to define aliased columns of any nature, i.e. "SELECT <myEntity>, <myEntity2>, "Test" as TestColAlias FROM", etc, etc.

Can NHibernate cope with this, and what is the best type of query to do?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 6:07 am 
Newbie

Joined: Tue Jun 13, 2006 7:10 am
Posts: 4
pls refer to this :

http://www.hibernate.org/hib_docs/nhibernate/html/manipulatingdata.html

hope it helps

regards,

boonseong


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 6:12 am 
Beginner
Beginner

Joined: Wed Apr 26, 2006 4:12 am
Posts: 29
Yes, I am aware of all the available info on CreateSQLQuery and doing aliases, but you can only seem to do it if it relates directly to a mapped entity. I want to have the freedom of putting arbitrary columns in for all kinds of reasons. You may want to just put some arbitrary marker in the resultset to act as a flag or status that doesn't necessarily relate to a persistent class's property.


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.