db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denis.griesme...@freenet.de
Subject Problem OR\'ing criterias
Date Fri, 31 Oct 2003 08:06:17 GMT
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


Mime
View raw message