-->
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.  [ 4 posts ] 
Author Message
 Post subject: select problem
PostPosted: Mon Jul 24, 2006 2:40 pm 
Beginner
Beginner

Joined: Thu Jun 01, 2006 11:27 am
Posts: 28
I have a class with a calculated property, when I execute:
from Order
the field calculated is showed ok but when i try:
select or.CalculatedCost
from Order or

NHibernate give me could not resolve property: CalculatedCost


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 25, 2006 4:55 am 
Newbie

Joined: Tue Jul 25, 2006 2:50 am
Posts: 11
Use alias
select or.CalculatedCost
from Order as or


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 26, 2006 10:24 am 
Beginner
Beginner

Joined: Thu Jun 01, 2006 11:27 am
Posts: 28
Sorry.. not Work, any other suggestion??

many thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 26, 2006 12:14 pm 
Senior
Senior

Joined: Wed Jun 15, 2005 4:17 am
Posts: 156
Did you map your calculated property in the mapping file? If not, Hibernate can't use it in HQL. It is working in the initial query because you see the value returned by the object, after it was loaded.

HTH,
Radu


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