I'm using NHibernate 3.1 with SQL CE 4 (Using the MsSqlCe40Dialect). Using Linq to produce queries.
If I use String.Contains, String.StartsWith or String.EndsWith, invalid SQL is produced.
For example:
Session.Query<User>.Where(user => user.Name.Contains("Joe"))
produces SQL like this:
SELECT Name FROM User WHERE (User.Name like ('%'||@p0||'%'))
This is somewhat simplified from the actual SQL produced, but the problem is in the extra '||...||'
I expect this is a problem with the SQL CE dialect, but I'm not sure where to go from here. Any ideas for a fix / workaround?