So I have the following sql
SELECT * FROM table Where Name COLLATE LATIN1_GENERAL_CI_AI LIKE 'myText%'
which I want to implement using QueryOver
At that moment when I have:
whereRestriction.Add(Expression.Sql("Name COLLATE LATIN1_GENERAL_CI_AI LIKE ?", String.Format("{0}%", subStringMatch), HibernateUtil.String));
which works great, but with two problems. Firstly, it is sqlserver specific, and secondly, the database column "Name" is hard-coded.
Does anyone have any suggestions to get around these two issues, or at least the hardcoded db column name?
marky source share