Andreas Eriksson
2018-10-30 15:26:44 UTC
I have the following linq query
session.Query<Car>().Where(c => c.Name.ToLower() == name.ToLower()).Select(c
=> c.Id)
which translates into the following sql query
select car0_."Id" as col_0_0_ from "Car" car0_ where lower(car0_.
"Identifier")=:p0;:p0 = 'volvo'
How can I force NHibernate to use lower for the parameter as well?
I want the sql to look like this:
select car0_."Id" as col_0_0_ from "Car" car0_ where lower(car0_.
"Identifier")=lower(:p0);:p0 = 'Volvo'
/Andreas
session.Query<Car>().Where(c => c.Name.ToLower() == name.ToLower()).Select(c
=> c.Id)
which translates into the following sql query
select car0_."Id" as col_0_0_ from "Car" car0_ where lower(car0_.
"Identifier")=:p0;:p0 = 'volvo'
How can I force NHibernate to use lower for the parameter as well?
I want the sql to look like this:
select car0_."Id" as col_0_0_ from "Car" car0_ where lower(car0_.
"Identifier")=lower(:p0);:p0 = 'Volvo'
/Andreas
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.