Markus Daniel <[EMAIL PROTECTED]> 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
> 
http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg03764.html

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

    Thomas

Reply via email to