AW: Problems to set up a subquery

2006-10-20 Thread Pfiester, Jan
Hello Thomas, I totally agree with you, but still i'm not able to come up with a solution i would call a good one. Can you please tell me what i'm doing wrong in the code below: My current working solution but not considered as a good one: Criteria criteria = new Criteria();

AW: Problems to set up a subquery

2006-10-20 Thread Thoralf Rickert
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

AW: Problems to set up a subquery

2006-10-20 Thread Pfiester, Jan
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

Re: AW: Problems to set up a subquery

2006-10-20 Thread Thomas Vandahl
Pfiester, Jan wrote: Hello Thomas, I totally agree with you, but still i'm not able to come up with a solution i would call a good one. Can you please tell me what i'm doing wrong in the code below: My current working solution but not considered as a good one: Criteria criteria =

AW: Problems to set up a subquery

2006-10-20 Thread Thoralf Rickert
queries (first to get Adressreferenz Ids and then to make the IN-Query). -Ursprüngliche Nachricht- Von: Pfiester, Jan [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. Oktober 2006 12:18 An: Apache Torque Users List Betreff: AW: Problems to set up a subquery Well, it is some real code

AW: AW: Problems to set up a subquery

2006-10-20 Thread Pfiester, Jan
? Oh btw, your code is working fine! Thx again... Jan -Ursprüngliche Nachricht- Von: Thomas Vandahl [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. Oktober 2006 12:24 An: Apache Torque Users List Betreff: Re: AW: Problems to set up a subquery Pfiester, Jan wrote: Hello Thomas, I

AW: Problems to set up a subquery

2006-10-20 Thread Pfiester, Jan
12:45 An: Apache Torque Users List Betreff: AW: Problems to set up a subquery You have three options: Overwrite toString and return the KundenaddressId that is set in the reference (because that is what you want). The other solution is to make a doSelectVillageRecords (that returns only

Re: AW: AW: Problems to set up a subquery

2006-10-20 Thread Thomas Vandahl
Pfiester, Jan wrote: Thx for that one, I've try your latest hint too, but i didn't know that you can check zero references like you did! criteria.add(AdressenreferenzPeer.KUNDENADRESS_ID, ??0??, Criteria.ISNULL); In your criteria what is the second param in the signature doing?

AW: Problems to set up a subquery

2006-10-19 Thread Thomas Fischer
-Ursprüngliche Nachricht- Von: Pfiester, Jan [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 17. Oktober 2006 13:20 An: Apache Torque Users List Betreff: AW: Problems to set up a subquery Hi again, at first many thanks to both of you for your quick response! I hope that Antonis

AW: Problems to set up a subquery

2006-10-17 Thread Pfiester, Jan
Hi again, at first many thanks to both of you for your quick response! I hope that Antonis is not feeling offended but i agree with Thomas that the problem should be solved by means of the framework and not via SQL-statements written by hand. Unfortunately, although spending the entire morning

AW: Problems to set up a subquery

2006-10-17 Thread Pfiester, Jan
Nachricht- Von: Pfiester, Jan [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 17. Oktober 2006 13:20 An: Apache Torque Users List Betreff: AW: Problems to set up a subquery Hi again, at first many thanks to both of you for your quick response! I hope that Antonis is not feeling offended but i agree