db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Daniel <dan...@synyx.de>
Subject Subselects in Torque 3.3rc2
Date Tue, 19 Aug 2008 12:45:06 GMT
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 markus.daniel@synyx.de
 * 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
 */


Mime
View raw message