How can I do "simple" (+,-,*,/) math with Criteria API?

For example, let's say I have Projections.Constant(1) and
Projections.Constant(2). How can I get their sum?
I tried with Projections.Constant(1) + Projections.Constant(2) but it
doesn't work (IProjection doesn't define the + operator). Then I tried
with SQLFunction("+", NHibernateUtils.Int32, Projections.Constant(1),
Projections.Constant(2)) but I get an error that my dialect (SQL2005)
doesn't implement the function.

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.

Reply via email to