I'm using Fluent NHibernate on Oracle and my problem is I have to apply lower() function on every string in where conditions. I made my own dialect that instead Oracle lower function is being used nls_lower. Database is primarly used by Microsoft Dynamics AX and this function improve performance. In standard query like this everything works fine:
session.QueryOver<User>()
.Where(x => x.Name.lower() == userName.lower())
.SingleOrDefualt<User>();
But how can I apply this lower() function in references? I can't find anything suitable for this and I expect It can be done somehow. I would expect something like this in mapping class but I can't find it:
References<Settings>(x => x.Settings)
.Column("SettingId").lower();
I don't want to convert my string immediately to lowercase but I really need generate query like this:
select * from User where nls_lower(Name) == nls_lower("somename");
Thank you!