Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Generate Case Insensitive SQL Query - DirectToFieldMapping

No, you need to use upper, or ensure your argument is using the correct case.

Some database such as MySQL allow a column to be defined as case
insensitive, so it may depend on the database.




Rohit Banga-2 wrote:
> 
> Hi All
> 
> Suppose I want to generate a case insensitive SQL query like:
> 
> SELECT * FROM table WHERE UPPER(ID)='ABC'
> 
> Then I will have to use upper() method on the Expression instance that 
> has to be passed to the query.setSelectionCriteria() method.
> Is there an alternate way where I indicate a case insensitive match 
> while configuring a DirectToFieldMapping so I do not have to explicitly 
> add the upper clause while generating the selection criteria?
> 
> -- 
> Thanks and Regards
> Rohit Banga
> Member Technical Staff
> Oracle Server Technologies
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/Generate-Case-Insensitive-SQL-Query---DirectToFieldMapping-tp31690645p31708486.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top