db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Balogh <and...@reea.net>
Subject Re: Help With Criteria for Special SQL
Date Wed, 01 Jun 2005 12:38:03 GMT
Hello,

    This should be possible with Criteria.CUSTOM, check here:
http://db.apache.org/torque/criteria-howto.html
    I think in your case it would be something like:
crit.add(CategoryPeer.CODE ,(Object)"Category.CODE + '%' LIKE '1' 
",Criteria.CUSTOM);


Best regards,
Andras.

Trevor Miller wrote:

> Hi,
>
> Is it possible to do the following select statement using a Criteria? 
> I can't seem to figure out how to do it.
>
> SQL:
> SELECT * FROM Category, ExtraCategoryInfo WHERE Category.CODE + '%' 
> LIKE '1';
>
> It seems strange but it actually works.
>
> Any help would be greatly appreciated.
>
> PS, any developers reading, keep up the good work, torque is excellent 
> ;o)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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