views:

721

answers:

1

Hi every one, I have Login Table that have utf8 charset and utf8 collation when I want check user name and retrieve other information for this specific user name the hql query give me the same result with lowercase and uppercase. what should l do for my HQL query that work case sesitive I use Mysql 5 and java hibernarte

this is my query:

return queryManager.executeQueryUniqueResult("select b.login from BranchEntity b where b.userName = ?", username);
+3  A: 

The easiest way is to change your column's definition to use case-insensitive collation like utf8_bin.

Details are here

ChssPly76
it seems work for me but must test more, tanx if it work fine I marked it.
Am1rr3zA