Hi,
subselects are not supported out of the box in Torque. there are various
threads in the user mailing list of how they can be implemented, the last
one should be only a few weeks ago. Please search the archives. The
solution involves Criteria.CUSTOM, but I cannot remember exactly how it
works.
Thomas
Αντώνης Λεμπέσης <[EMAIL PROTECTED]> schrieb am 17.06.2005 16:25:53:
> Hello,
>
> I have these two tables:
> doc(id, title) and
> rel(source, target) (both 'source' and 'target' are foreign keys to
> doc.id)
>
> I want to form the following query, using Criteria:
>
> SELECT d1.title
> FROM doc d1
> WHERE EXISTS (
> SELECT *
> FROM doc d2, rel r
> WHERE r.source = d1.id AND r.target = d2.id AND d2.title = 'foo')
>
> Any ideas on how to do this???
>
> Thanks,
> Antonis
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>