Subselects in Torque 3.3rc2

Markus Daniel <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
Hello list,
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?

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?

Now I managed this with two criteria.addJoin();

Is there a better way?

Thanks in advance.
Kind regards,
Markus


-- 
/**
 * Markus Daniel
 * Bachelor of Science
 *
 * Synyx GmbH & Co. KG
 * OpenSource Solutions
 * Karlstr. 68
 * 76137 Karlsruhe
 *
 * phone +49(0)721 66 48 79 31
 * fax   +49(0)721 66 48 877
 * eMail [email protected]
 * www   http://www.synyx.de
 * skype synyx_daniel
 * irc   irc.synyx.de
 *
 * Sitz der Gesellschaft: Karlsruhe
 * Registergericht: Mannheim
 * Handelsregisternummer: HRA 4793
 * USt-IdNr.: DE249264296
 *
 * Komplementärin: Elatech Verwaltungs GmbH
 * Sitz der Gesellschaft: Karlsruhe
 * Geschäftsführer: Markus Daniel
 * Registergericht: Mannheim
 * Handelsregisternummer: HRB 7250
 */
signature.asc (application/pgp-signature, 254 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIqsBSA6KmbVkuXQkRAtTMAJ9ALuSsFpDR6gpl7CQiSHQwqn0U1ACgoqXR
RvXrjihJLivWJRNSmRIJmaU=
=mhkF
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.