ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Duong (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-315) the first dynamic prepend seems to be required
Date Tue, 04 Jul 2006 03:30:29 GMT
the first dynamic prepend seems to be required

         Key: IBATIS-315
         URL: http://issues.apache.org/jira/browse/IBATIS-315
     Project: iBatis for Java
        Type: Bug

  Components: SQL Maps  
    Versions: 2.1.7    
 Environment: Windows XP SP2, JDK 1.4.2
    Reporter: Doug Duong
    Priority: Minor

I have a statement defined as below:

    select ...
    from ...
    <dynamic prepend="where">
        <isNotNull property="prop1">
        <isNotNull property="prop2" prepend="and">

If both prop1, prop2 are not null, it produces a sql like this:
    select ...
    from ...
=> Although a prepend "and" is specified for "prop2", it is not added before "text2". However,
if I specify a prepend "and" for "prop1", then the sql is produced correctly: an "and" is
added before "text2". Therefore, I say the first prepend must be always specified. Am I right?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message