Hi All,

I am sending this question to this list, because I am receiving
MAILER-DAEMONS when following the subscription links to the torque-user
mailinglists from the torque website.

Here is my Problem:

I have a criteria Object that I build like this:

cri.add(cri.getNewCriterion(WebserverDailyPeer.DAY, (Object)
("(UNIX_TIMESTAMP(" + WebserverDailyPeer.DAY + ") between " + (von_date
/ 1000) + " and " + (bis_date / 1000) + " )"), Criteria.CUSTOM));
cri.add(WebserverDailyPeer.KID, kdid);


So when i run the 
Log.debug(WebserverDailyPeer.createQueryString(cri));
I get:
SELECT  FROM webserver_daily WHERE (UNIX_TIMESTAMP(webserver_daily.DAY)
between 1009839600 and 1041375600 ) AND webserver_daily.KID=3

Which is correct. Then I want to use a "copy" of the criteria object and
modify it like this:
myCrit = cri.clone();
myCrit.addSelectColumn("COUNT(*)");
Log.debug(WebserverDailyPeer.createQueryString(cri));

But then I get:
SELECT COUNT(*) FROM webserver_daily WHERE
webserver_daily.DAY='(UNIX_TIMESTAMP(webserver_daily.DAY) between
1009839600 and 1041375600 )' AND webserver_daily.KID=3
^^^^^^^^^^^^^^^^^^^^^

Which is incorrect!!!

Then I tried to just copy the hashtable, but same effect:
Criteria myCrit = new Criteria();
Enumeration e = cri.keys();
while (e.hasMoreElements())
{
        Object key = e.nextElement();
        myCrit.put(key, cri.get(key));
}

Can someone help me, please?

Mit freundlichen Gr�ssen
 
J�rgen Hoffmann
ByteACTION GmbH
 
cert. Perl Programmer
cert. Linux System Administrator
cert. Java Programmer

Besuchen Sie uns doch auf der CeBIT 2003
in Halle 4/Stand 70


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to