Eq will send PropertyName = null which is not what you want, you need to use
IsNull for null values

Gustavo.

On Mon, Nov 29, 2010 at 10:42 PM, Krishna Jetti <[email protected]>wrote:

>
> Hello All,
>
>   I am working on the NHibernate criteria and having problems with
> including the objects that has null as the property value with
> NHibernate.Criterion.Expressions.Not(Eq(PropertyName, value)).
>
>  if we have 10 objects with 5 of them having distinct values for a
> property X and 5 objects with null value, when use the Not expression,
> I am expecting to retrieve the 5 objects that has null value along
> with any other objects with property X value that is different from
> the value passed it. But I am not able to retrieve the 5 that has
> null  value.
>
>  Does anyone has any suggestions?
>
> Thanks for your time
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

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