db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: HowTo make Criteria with use function in WHERE clause?
Date Wed, 28 Jul 2004 23:27:03 GMT
Vladimir Figurov wrote:

> Hello!
> I use Oracle 9i and try use Text Search in BLOB field.
> A simple Oracle code for text search is "SELECT ... FROM table_content
> WHERE contains(blob_field, 'search_string')>0
>
> How to build Criteria?
> Criteria crit = new Criteria(ContentsPeer.DATABASE_NAME);
> crit.add(ContentsPeer.TABLE_NAME, "contains(CONTENT,'%five%')", new
> Integer(0), Criteria.GREATER_THAN);
> returned a BAD Criterion :
> crit.toString() : SELECT  FROM contents WHERE
> contents.contains(CONTENT,'%five%')>0
> and Oracle is not understand this Select ;-((
>
Have you tried Criteria.CUSTOM - there is an example at 
http://db.apache.org/torque/criteria-howto.html

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


---------------------------------------------------------------------
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