db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tulsi Das <quixote_...@yahoo.com>
Subject Re: Problem OR\'ing criterias
Date Fri, 31 Oct 2003 12:17:55 GMT
I had the exact same problem, it seems that or() adds "AND" to the
query string!

no time to check the source code yet... will let you know if something
arises

Tulsi

 --- denis.griesmeyer@freenet.de escribió: 
> Hello torque-users,
> 
> I have a problem with OR'ing criterias. 
> 
> The code is as follows:
> 
> ---SNIP---
> 
> Criteria crit = new Criteria();
> 		
> crit.or (SongsPeer.ARTIST,(Object)searchString,Criteria.LIKE);
> crit.or (SongsPeer.TITLE,(Object)searchString,Criteria.LIKE);
> crit.or (SongsPeer.ALBUM,(Object)searchString,Criteria.LIKE);
> 
> ---SNIP---
> 
> I would expect the query to look sth. like this:
> 
> ---SNIP---
> ...
> FROM SONGS 
> WHERE SONGS.ALBUM LIKE '%4%' OR SONGS.TITLE LIKE '%4%' OR
> SONGS.ARTIST LIKE '%4%'
> ---SNIP---
> 
> But instead it AND's all X LIKE Y's together... :-(
> 
> Maybe I missunderstood some of the basic concepts of torque... 
> 
> Can someone give me a hint please?
> 
> Thanks in advance
> Denis
> 
> 
> -- 
> eBay - Jetzt besser einkaufen!
> Ueber 1. Mio. Angebote. Startpreise ab EUR 1,-
> http://www.freenet.de/tipp/shopping/ebay
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>  

------------
Internet GRATIS es Yahoo! Conexión
4004-1010 desde Buenos Aires. Usuario: yahoo; contraseña: yahoo
Más ciudades: http://conexion.yahoo.com.ar

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message