This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Does Criteria checks for equal, ignoring case? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Does Criteria checks for equal, ignoring case?" Watch "Does Criteria checks for equal, ignoring case?" New topic
Author

Does Criteria checks for equal, ignoring case?

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
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
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
The problem has been solved by using ".ignoreCase()" method.

Thanks
 
jQuery in Action, 2nd edition
 
subject: Does Criteria checks for equal, ignoring case?
 
Similar Threads
Autoboxing with equal method
simple question regarding strings
Strings' Puzzle!
equal/== help
please explain me the output of the following programs