NHibernate version: 1.2b2
Database: MSSQL2005
Hi all,
I hope this hasn't been asked... I've been unsuccessful in finding anything about it. I'm doing a simple get for a User object that matches the supplied username and password. The problem I'm having is that nHibernate is converting the specified string value to lower. For the username, that's fine, but the password should be case-sensitive. I've included a code snippet for how I'm getting the User object. Any help would be appreciated.
Code:
public User GetUserByUsernameAndPassword(string username, string password)
{
ICriteria crit = this._activeSession.CreateCriteria(typeof(User));
crit.Add(Expression.Eq("Username", username));
crit.Add(Expression.Eq("Password", password));
return crit.UniqueResult<User>();
}
Thanks
Jim
btw, I would include the nHibernate generated sql, but I'm partially stupid and fail to understand how to get it to log properly :)