Hi,

I'm trying to run a query which will select 'propertya - propertyb'
and must be having a bad day as I can't get it to work (NH3.0 alpha 3,
QueryOver API)

So-far I've tried:

Doing a .Select(o => o.propertya - o.propertyb) but queryover expects
the expression to be a property.
Mapping a formula on my entity to the expression. Problem is propertyb
is on a base-class and I can't get the formula to take that into
account when producing sql.
Doing a .SqlProjection which gets closer but the code is pretty gross
and I couldn't help but think there must be an easier way.

Has anyone done this using the Criteria API, and if-so how did you do
it? Apologies if it's really simple (and it feels like it should be),
but I've googled a fair bit and have not come up with any examples.

Thanks,

Graeme

-- 
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