On Mar 27, 2007, at 9:33 PM, Zeljko Trogrlic wrote:
Vincent Massol wrote:
On Mar 27, 2007, at 4:19 PM, Zeljko Trogrlic
wrote:
Esbach, Brandon <Esbachb@...> writes:
PostgreSQL treats LIKE queries as case-sensitive;
so to
make it case-insensitive you would have to use ilike (extra i in
front of
like) to make it case-insensitive.
ILIKE is PostgreSQL specific. Two UPPERCASE will work on any
database.
Are you sure there isn't any hibernate-specific solution to the
problem? (which IMO might be better)
What about using something like the ilike in http://
www.hibernate.org/hib_docs/v3/api/org/hibernate/criterion/
Restrictions.html? Does anyone know how to use this Expression
class in Hibernate?
Thanks
-Vincent
ILIKE is not in HQL reference. Can somebody running something else
than PostgreSQL test is it working on his system?
If ILIKE doesn't work on other databases, I'll rather keep UPPERs
because fiddling with Hibernate API in Velocity is both impossible
and, to my standards, over-engineered.
I don't think it should be done in Velocity at all. We could do it in
Java, in the search implementations.
Again, I don't know how this works (or doesn't work) in Hibernate.
I'm just making sure we've covered all angles before deciding.
Thanks
-Vincent