-->
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.  [ 1 post ] 
Author Message
 Post subject: Inverse LIKE query.
PostPosted: Sun May 28, 2006 3:12 pm 
Newbie

Joined: Wed Dec 14, 2005 3:29 pm
Posts: 16
I have a table RefererHostDup to filter duplicates for referer host queries. There's a column Host that contains, say www.google.%. When I get a request, I have a host from an url, eg. www.google.fr.

I can do SELECT * FROM RefererHostDup WHERE 'www.google.fr' LIKE Host. It's the inverse of LIKE, which avoids iterating through all records in the table. Seems to work fine.

Looks like this isn't supported with Session.CreateCriteria. (It would quote "Host".) For now I do a SQLQuery. Maybe it should be supported?

Ideas?

Thx
dB.


Hibernate version: 1.0.2
Name and version of the database you are using: SQL 2005


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

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.