You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jeff Butler (JIRA)" <ib...@incubator.apache.org> on 2006/06/07 20:51:31 UTC

[jira] Closed: (IBATIS-282) truncation of date property values in the presence of dynamic sql

     [ http://issues.apache.org/jira/browse/IBATIS-282?page=all ]
     
Jeff Butler closed IBATIS-282:
------------------------------

    Resolution: Cannot Reproduce

As discussed in the comments, I cannot repeat this behavior.  Everything seems to work as expected.  Feel free to reopen if you can provide a repeatable test case.


> truncation of date property values in the presence of dynamic sql
> -----------------------------------------------------------------
>
>          Key: IBATIS-282
>          URL: http://issues.apache.org/jira/browse/IBATIS-282
>      Project: iBatis for Java
>         Type: Bug

>   Components: SQL Maps
>     Versions: 2.1.7
>  Environment: linux, mysql, java 1.5
>     Reporter: z. zhong
>  Attachments: test.zip
>
> strange interaction between Java.util.Date parameters and dynamic sql.
> query 1:
>     select
>         ...
>     where
>          ...
>          and rd.event_time       &lt;= #endTime#
> the generated SQL is
>         ...
>         and rd.event_time       <= '2006-03-30 18:33:46'
>         
> so far so good.
> query 2:
> just add an extra dynamic sql at the end:
>     select
>         ...
>     where
>          ...
>                  and rd.event_time       &lt;= #endTime#
>                   <iterate prepend="and" property="done" open=" rd.is_complete in (" conjunction="," close = ")">#done[]#</iterate>
>         
> and the SQL becomes
>         ...
>         and rd.event_time       <= '2006-03-30'
>         and ...
> The date value has been truncated.
> Notes:
> * i've tried other dynamic sql elements: isNotEmpty, etc., and got the same problem.
> * insert seems to work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira