session.Query<Product>().Where(p => p.Name.Conains("Paper"))
creates to the following SQL:
(...)
where prod1_.Name like ('%' || 'Paper' || '%')
What I would like to see is obviously: like '%Paper%'
I also have the same issue with StartsWith
and EndsWith
.
NHibernate version is 3.2.0 and the dialect is NHibernate.Spatial.Dialect.MsSql2008GeometryDialect
if it matters.
Any ideas on what's going on here?