db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pfiester, Jan" <jan.pfies...@ict.fraunhofer.de>
Subject AW: Problems to set up a subquery
Date Fri, 20 Oct 2006 10:17:40 GMT
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:thoralf.rickert@cadooz.de] 
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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message