0 Replies Latest reply on Sep 5, 2005 7:42 PM by Gustavo Ferrero

    Date and JBOSSQL

    Gustavo Ferrero Newbie

      Hi all!, i write a simple example to compare a range of dates, this is the method:

      
       <query>
       <query-method>
       <method-name>findByDate</method-name>
       <method-params>
       <method-param>java.lang.Integer</method-param>
       <method-param>java.util.Date</method-param>
       <method-param>java.util.Date</method-param>
       </method-params>
       </query-method>
       <declared-sql>
       <where><![CDATA[ idPaciente = {0} AND fecha >= {1} AND fecha <= {2}]]></where>
       </declared-sql>
       <read-ahead>
       <strategy>none</strategy>
       </read-ahead>
       </query>
      



      The generated SQL would be:

      
      SELECT *
      FROM IMAGEN
      WHERE idPaciente = {0} AND fecha >= {1} AND fecha <= {2}
      
      


      But when i call the method "findByDate" in my program the result collection is null.

      Can anyone help me or tell me what is happening with the comparison between dates?

      Thanks.

      Gustavo