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

Bobby
  • 11,419
  • 5
  • 44
  • 69
Arnstein
  • 1
  • 1

1 Answers1

0

There seems to be a bug in the dialect NHibernate.Spatial.Dialect.MsSql2008GeometryDialect. When changing the dialect to NHibernate.Dialect.MsSql2008Dialect the created SQL is correct.

Arnstein
  • 1
  • 1