Hi Everybody,

I'm trying to use NHibernate.Criterion.Expression.Eq to query a char
type property, as follows:

public IList<Region> executeCriteria()
{
            ICriteria criteria = Session.CreateCriteria(typeof
(Region), "reg");
            criteria.Add(NHibernate.Criterion.Expression.Eq("Sigla",
'S'));
            return criteria.List<Region>();
}

The code above works perfectly, but when i use IgnoreCase:

public IList<Region> executeCriteria()
{
            ICriteria criteria = Session.CreateCriteria(typeof
(Region), "reg");
            criteria.Add(NHibernate.Criterion.Expression.Eq("Sigla",
'S').IgnoreCase());
            return criteria.List<Region>();
}

The error happens:

could not execute query
[ SELECT this_.REGIONID as REGIONID18_0_, this_.REGIONDESCRIPTION as
REGIONDE2_18_0_, this_.REGIONSIGLA as REGIONSI3_18_0_ FROM REGION
this_ WHERE lower(this_.REGIONSIGLA) = ? ]
Positional parameters:  #0>s

Any idea?

Att,

Victor

--

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