If you are using a case-sensitive database it probably either has a  
function that converts strings to lower (or upper) case, or else a  
case-insensitive comparison function.
Rewrite your where clause to use one of those functions, e.g.
   "where caseinsensitivecomparison('Bill', name) is true" or else

rewrite your named query as ... where :personName = tolower(name)"
and pass the parameter via
   :personName = toLower(Bill)

On Jul 10, 2009, at 9:23 AM, Andrea Ottaviani wrote:

> Mhm...
> the problem is on the parameter passing:
> Ex.: if i have in  Bill in the tabel Person, and i search for bill  
> it doesn't work...
> i need a suggestion...
>
>
>
> 2009/7/10 Bill Gordon <gord...@phototype.com>
> Andrea,
>
> Typically this is a database configuration setting. Java items like  
> named queries and their parameters are case sensitive, but database  
> operations like where clauses and comparisons are case sensitive or  
> insensitive depending on database configuration. For example, SQL  
> server is by default case insensitive so the conditional
>   @txt = 'consistent'
> evaluates to true if @txt has either value 'consistent' or  
> 'Consistent'
>
> bill
>
>
> On Jul 10, 2009, at 8:50 AM, Andrea Ottaviani wrote:
>
> Hi guys, i need a suggestion
> I have an application (web application, hibernate based) and i have  
> to make it case-insensitive on select and insert queries
> It is possible by hibernate ?
> Or i need to change all the queries in the application?
> regards
> andrea
>
> -- 
> L'informazione non è conoscenza
> La conoscenza non è saggezza
> La saggezza non è verità
> La verita' non è bellezza
> La bellezza non è amore
> L'amore non è musica
> La musica è il meglio
> (FZappa)
>
>
>
>
>
>
> -- 
> L'informazione non è conoscenza
> La conoscenza non è saggezza
> La saggezza non è verità
> La verita' non è bellezza
> La bellezza non è amore
> L'amore non è musica
> La musica è il meglio
> (FZappa)
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to