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
|