-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Can I get case INsensitive results using Criteria interface?
PostPosted: Mon Jun 27, 2005 7:22 am 
Newbie

Joined: Fri Jun 10, 2005 12:25 pm
Posts: 6
Guys

I am using Criteria interface to query the database. But I am getting results based on ASCII comparison.
E.g. if database has abc, ABC, PQR, DDD, ccc.

I am getting
ABC
PQR
DDD
abc
ccc

whereas I want

ABC
abc
ccc
DDD
PQR

Using Criteria how can I get it? I know how to get it using Query interface but I want to get this using only Criteria interface.

Thanks
Sunil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 10:06 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ilike

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 12:43 am 
Newbie

Joined: Fri Jun 10, 2005 12:25 pm
Posts: 6
Hi Emmanuel
I didn't get you. "ilike"???

Rgds
Sunil


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 3:55 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
org.hibernate.criterion.IlikeExpression

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 12, 2005 8:24 pm 
Newbie

Joined: Tue Oct 12, 2004 10:32 pm
Posts: 5
I don't understand how ilike addresses the original question. This poster is asking about ordering the results. ilike is case-insensitive, but it does not order the results.

I am looking for an answer to the original question, but I haven't found it in this forum. It would be great if org.hibernate.criterion.Order had methods like:

static Order asc(String propertyName, boolean caseInsensitive)

and

static Order desc(String propertyName, boolean caseInsensitive)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 13, 2005 2:08 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
My fault I've read too quickly.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.