This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does Criteria checks for equal, ignoring case?