0

i am using following code to check user.

DetachedCriteria queryCriteria = DetachedCriteria
queryCriteria.add(Restrictions.eq("UserName", userObj.getUserName().trim()));
userList = htObj.findByCriteria(queryCriteria);

where userobj is user object passes from backing bean

the problem is that it returns result without type restriction, e.g. though i enter 'admin' as username and there is 'ADMIN' in database it matches the record

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
mohit_pipariya
  • 67
  • 1
  • 13

1 Answers1

0

I think the problem lies more in the database than in the criteria query : check Case sensitive on restrictions 'equals id' in Hibernate restrictions and configure your database accordingly.

Community
  • 1
  • 1
benzonico
  • 10,635
  • 5
  • 42
  • 50