db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: Subselects in Torque 3.3rc2
Date Tue, 19 Aug 2008 16:58:57 GMT
Markus Daniel <daniel@synyx.de> schrieb am 19.08.2008 14:45:06:

> I am looking for a possibility to make a subselect like:
> ------------
>  select name from resource where id in
>  (select id from resource_postalcode_rel where postalcode_id in
>   (select id from postalcode where postalcode.city_name like '%76%'
>     or postalcode like '%76%'))
> ------------
> by criteria/criterion.
> I have found this

> I hope there is an other option than using the custom modifier.
> Can anybody tell me?

Subselects were added somewhere in the 3.3 dev cycle. No idea whether 
3.3-RC2 already had it. Check the change logs.
You can activate it by adding the subselect criteria to the outer 
> I also found "doSelectJoin<tablename>" but this is only half of what I
> need. Maybe it is an idea to reimplement a
> doSelectJoin<firstTablename_secondTablename>-Method.
> Is this an option and a good idea?

If you need it often, why not. You can write it yourself or autogenerate 
it by modifying the templates.

Check the generated code for the doSelectJoin<tablename> method, you 
should get the idea pretty fast.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message