Well, it is some real code... > Did you overwrite the toString() method in Adressreferenz? No, I did'nt.
> but my Torque version (3.2) uses toString() to create the query. The > > generated toString() method in BaseAdressreferenz is nice for > debugging but useless for sql-queries... So what are you doing in the overwritten toString() method? Do you just build together a subselect-querystring arrayobject according to the returned result objects? Don't you have to hard code row references again (see the custom-tag), which is what i'm trying to avoid. Bye Jan -----Ursprüngliche Nachricht----- Von: Thoralf Rickert [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. Oktober 2006 11:24 An: Apache Torque Users List Betreff: AW: Problems to set up a subquery > Sort of a "clean" approach, but not working due sql exections: > [...] > criteria.addNotIn(KundenadressePeer.KUNDENADRESS_ID, > AdressenreferenzPeer.doSelect(subCriteria)); > [...] Just a question because I'm not sure if you just show an example or the real code, that you're using. The doSelect() method in your addNotIn() returns a list of Adressreferenz objects. If you put this into a addNotIn - I think the query-generation-process uses the String representation of these Adressreferenz objects to create the sql-query. Did you overwrite the toString() method in Adressreferenz? I'm not sure, if you have to do this, but my Torque version (3.2) uses toString() to create the query. The generated toString() method in BaseAdressreferenz is nice for debugging but useless for sql-queries, I think. bye Thoralf --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]