David Zhao wrote:
Hi there,
How do I either check if a certain record exists in the table using Torque
OM class, or insert a new record, and retrieve the last_inserted_id?
Thanks,
1.) There are two ways. Either you set up a Criteria object containing
the primary key (see the
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();
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
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
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 =
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 the
columns that you have ask for with subCriteria.addSelectColumn()). The
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?
What is the 0 indicating?
Many thx!
As i've just stated, i had tried to do it by using an outer join at first too,
but i did'nt know how to eliminate the intersection of both tables in the
result set...
-Ursprüngliche Nachricht-
Von: Thoralf Rickert [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 20. Oktober 2006
Hi all, Im having troubles using torque to connect to a
MS Access database via jdbcodbc driver. I managed to create
the java classes for this db, using the command
ant f build-access.xml
The problems arise qhen I use either
ant f build-access.xml create-db
or
ant f build-access.xml
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?
10 matches
Mail list logo