Hello all,

think I've found a bug in the "andDate" methods of Criteria: the call to
the method getTime() is missing.

Adding the method call and recompiling torque-3.2 (runtime) solved the
problem.

Please, check the attached patch. Thank you

Federico
-- 
Concept - shaping technology 

Federico Fissore  
Developer 
[EMAIL PROTECTED] 
http://www.concept.it   

Concept S.r.l - via F.Tamagno, 3 - 20124 - Milano 
tel: +39 0229536401 
fax: +39 0220402984 
  
E-Mail Disclaimer 
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission.

If verification is required please request a hard-copy version. 
Concept Srl, via F. Tamagno,3 - 20124 Milan - Italy - www.concept.it 
--- /home/federico/Desktop/torque-3.2-src.tar.gz_FILES/torque-3.2/src/java/org/apache/torque/util/Criteria.java	2005-12-06 22:42:34.000000000 +0100
+++ Criteria.java	2006-07-06 15:30:05.000000000 +0200
@@ -2307,7 +2307,7 @@
      */
     public Criteria andDate(String column, int year, int month, int date)
     {
-        and(column, new GregorianCalendar(year, month, date));
+        and(column, new GregorianCalendar(year, month, date).getTime());
         return this;
     }
 
@@ -2332,7 +2332,7 @@
     public Criteria andDate(String column, int year, int month, int date,
             SqlEnum comparison)
     {
-        and(column, new GregorianCalendar(year, month, date), comparison);
+        and(column, new GregorianCalendar(year, month, date).getTime(), comparison);
         return this;
     }
 

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

Reply via email to