Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does Criteria checks for equal, ignoring case?

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

See my code below:



The above code checks db for address value equal to tme.getAddress(). If found, prints "Already Exists", else inserts it into database.

Suppose, if there is a value 'Mumbai; in db, and 'tme.getAddress' has String 'mumbai'. It will be inserted. What i want is that it should check for address ignoring case.

How should i proceed?
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem has been solved by using ".ignoreCase()" method.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic