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: [Criteria] where colA=colB
Date Thu, 24 Feb 2005 15:03:02 GMT
Hello,

    Can You give a concrete example what are  You trying to do?
I think this case:
WHERE TABLE_1.COL_A = TABLE_2.COL_B
can be handled by:
crit.addJoin(Table1Peer.ColA,Table2Peer.ColB)
or this is not the join condition between the tables?
    Also you may try to use Criteria.CUSTOM for the first case or maybe 
i misunderstood You.

Best regards,
Andras.

T E Schmitz wrote:

> Hello,
> I have been using Torque for quite some time now and am probably 
> overlooking something:
>
> I would like to produce something like:
>
> WHERE TABLE_1.COL_A = TABLE_1.COL_B
>
> or
>
> WHERE TABLE_1.COL_A = TABLE_2.COL_B
> (in a multi-table join)
>
> But as far as I can see all Criteria.and(...) methods just take a 
> value as the comparison argument.
>
> How can I do this?



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