Hi,
I'm currently using NHibernate v2.0.1 and I needed to use projection
for a particular case.
For simplicity I choosed here a trivial example of what I'm trying to
do:
select wage.Currency, (wage.Amount * wage.Percentage) from Wage wage
Wage class is smth like:
public class Wage
{
public int Id
{get;}
public int Amount
{ get; set; }
public string Currency
{ get; set; }
public Single Percentage
{ get; set; }
}
Problem is when I run the query I'm getting a
NHibernate.QueryException: "HQL function expected before '(' in SELECT
clause. [select wage.Currency, (wage.Amount *
_employeewage.Percentage) from BOLayer.Wage wage ]"
Can someone tell me pls what is the exact HQL syntax for such cases
(or if HQL allows expressions in select clause)?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.