You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jerome Jacobsen (JIRA)" <ib...@incubator.apache.org> on 2005/01/04 17:38:12 UTC

[jira] Created: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

ProbeException when iterate tag contains dynamic tags
-----------------------------------------------------

         Key: IBATIS-42
         URL: http://issues.apache.org/jira/browse/IBATIS-42
     Project: iBatis for Java
        Type: Bug
    Versions: 2.0.9    
 Environment: JDK 1.4.2_06
Windows 2000 SP4
    Reporter: Jerome Jacobsen


When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.

I've added this to DynamicAccount.xml:

  <select id="dynamicQueryByExample2"
    parameterClass="testdomain.Account"
    resultClass="testdomain.Account">
    select
      ACC_ID          as id,
      ACC_FIRST_NAME  as firstName,
      ACC_LAST_NAME   as lastName,
      ACC_EMAIL       as emailAddress
    from ACCOUNT
    <dynamic prepend="WHERE">
      <isNotNull prepend="AND" property="ids">
        <iterate property="ids" conjunction="OR">
         <isNotNull property="ids">
           ACC_ID = #ids[]#
         </isNotNull>
        </iterate>
      </isNotNull>
    </dynamic>
  </select>

And I've added this test in IterateTest.java:

  public void testArrayPropertyIterate2() throws SQLException {
    Account account = new Account();
    account.setIds(new int[]{1, 2, 3});
    List list = sqlMap.queryForList("dynamicQueryByExample2", account);
    assertAccount1((Account) list.get(0));
    assertEquals(3, list.size());
  }



-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by Brandon Goodin <br...@gmail.com>.
2.1.0 is in the SVN repository. You can check it out and run build.
It's really easy to do because ibatis is self contained. When you
check it out, simply go to the build directory and run build.bat from
the command line.

Brandon

On 4/21/05, cristina (JIRA) <ib...@incubator.apache.org> wrote:
>      [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_63433 ]
> 
> cristina commented on IBATIS-42:
> --------------------------------
> 
> I am using also iBatis in my application and i found the same kind of problem :
> I don't know how to make a condition on a property inside an iteration over a List of objects :
> <iterate prepend="" property="mylist" open="" close="" conjunction="UNION">
> SELECT id from table WHERE type='type'
> <isNotEqual prepend="AND" property="mylist.conditionExt" compareValue="any">
>   colExt=#mylist[].conditionExt#
> </isNotEqual>
> </iterate>
> 
> I have the same exception of course !
> 
> I did not really understand the previous solution, and where can i find the version 2.1.0 ?
> 
> Thanks a lot
> 
> > ProbeException when iterate tag contains dynamic tags
> > -----------------------------------------------------
> >
> >          Key: IBATIS-42
> >          URL: http://issues.apache.org/jira/browse/IBATIS-42
> >      Project: iBatis for Java
> >         Type: Bug
> >   Components: SQL Maps
> >     Versions: 2.1.0
> >  Environment: JDK 1.4.2_06
> > Windows 2000 SP4
> >     Reporter: Jerome Jacobsen
> >     Assignee: Brandon Goodin
> >      Fix For: 2.1.0
> >  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
> >
> > When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> > I've added this to DynamicAccount.xml:
> >   <select id="dynamicQueryByExample2"
> >     parameterClass="testdomain.Account"
> >     resultClass="testdomain.Account">
> >     select
> >       ACC_ID          as id,
> >       ACC_FIRST_NAME  as firstName,
> >       ACC_LAST_NAME   as lastName,
> >       ACC_EMAIL       as emailAddress
> >     from ACCOUNT
> >     <dynamic prepend="WHERE">
> >       <isNotNull prepend="AND" property="ids">
> >         <iterate property="ids" conjunction="OR">
> >          <isNotNull property="ids">
> >            ACC_ID = #ids[]#
> >          </isNotNull>
> >         </iterate>
> >       </isNotNull>
> >     </dynamic>
> >   </select>
> > And I've added this test in IterateTest.java:
> >   public void testArrayPropertyIterate2() throws SQLException {
> >     Account account = new Account();
> >     account.setIds(new int[]{1, 2, 3});
> >     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
> >     assertAccount1((Account) list.get(0));
> >     assertEquals(3, list.size());
> >   }
> 
> --
> 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
> 
>

[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62700 ]
     
Brandon Goodin commented on IBATIS-42:
--------------------------------------

I have a proposed solution. I understand the nature of the problem. I was just curious what the thoughts were on the proposed solution.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Clinton Begin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=all ]
     
Clinton Begin closed IBATIS-42:
-------------------------------


> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>      Fix For: 2.1.0
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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


[jira] Updated: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Jerome Jacobsen (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Jerome Jacobsen updated IBATIS-42:
----------------------------------

    Attachment: DynamicAccount.xml

See dynamicQueryByExample2 select.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=all ]
     
Brandon Goodin resolved IBATIS-42:
----------------------------------

     Resolution: Fixed
    Fix Version: 2.1.0

added ability to nest dynamic tags in iterate. added 1 sqlmap test that succeeds.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>      Fix For: 2.1.0
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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


[jira] Updated: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Jerome Jacobsen (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Jerome Jacobsen updated IBATIS-42:
----------------------------------

    Attachment: IterateTest.java

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62701 ]
     
Clinton Begin commented on IBATIS-42:
-------------------------------------

Sorry dude, I missed your proposed solution.  Go ahead with option #1.  It should work for nested iterates too.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Clinton Begin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Larry Meadors (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62698 ]
     
Larry Meadors commented on IBATIS-42:
-------------------------------------

Brandon, 

I think we should fix it.

Reality is that I do not think I can get to it before May. 

Do you think it is a case where you could better map out the fix so that maybe one of the reporting users could fix it? Jerome seemed to have a reproducible test case that shows the failure, so maybe with a bit of guidance he could fix it?

I know you are as busy (or more busy) that I am, so if you can not get to it, you can not get to it. I suspect Clinton is in the same situation - or he would have fixed it already. ;-)

The nature of any OSS project is that users they have to either (a) wait; or (b) open the code up, fix it themselves, and submit the patch.

Larry

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Brandon Goodin updated IBATIS-42:
---------------------------------

    Assign To: Brandon Goodin
    Component: SQL Maps

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62702 ]
     
Brandon Goodin commented on IBATIS-42:
--------------------------------------

Cool! i'm glad that's an acceptable solution. I'll get it in over the next few days.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Clinton Begin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Clinton Begin updated IBATIS-42:
--------------------------------

    Assign To: Clinton Begin  (was: Brandon Goodin)
     Due Date: 2005-04-30 00:00:00.0
      Version: 2.1.0
                   (was: 2.0.9)


I will commit to attempt a fix by April 30th.  I did look at this while fixing the bugs for 2.0.9b, but it is a complex problem to solve.  That said, it's not impossible (of course -- it's software!).    :-)

I'll give it a shot.


> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Clinton Begin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Brandon Goodin reassigned IBATIS-42:
------------------------------------

    Assign To: Brandon Goodin  (was: Clinton Begin)

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62443 ]
     
Brandon Goodin commented on IBATIS-42:
--------------------------------------

Users:
Is this a problem that is preventing anyone from using the frameowrk effectively?

Committers:
Is this something we want to fix? This is happening because the #ids[]# notation is getting processed in the isNotNull tag which does not rewrite it with the ([0]) index references. 

Option #1
We could solve this by passing an property name and index reference (propertyName + "[]" and "propertyName+[0]") into the SqlTagContext and having the other tags check to see if it exists. If the nested dynamic tag has the property reference (propertyName + "[]") that is being searched for it can replace it with the appropriate index ("propertyName+[0]").

We would have to setup these references in a LinkedList as a stack (like we are doing for removeFirstPrepend) so that we could handle nested iterates as well.

Option #2
We deal with this in the next version of dynamic SQL

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_62694 ]
     
Brandon Goodin commented on IBATIS-42:
--------------------------------------

Gordon Shankman wrote:

I am having the same problem using iterate to access maps stored in a Vector (Vector<HashMap<String, Object>>).  I was curious to know if you had an estimated time frame for release of this bug fix or if it will not be fixed until the next version of Sql Maps is released.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "cristina (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=comments#action_63433 ]
     
cristina commented on IBATIS-42:
--------------------------------

I am using also iBatis in my application and i found the same kind of problem : 
I don't know how to make a condition on a property inside an iteration over a List of objects :
<iterate prepend="" property="mylist" open="" close="" conjunction="UNION"> 
SELECT id from table WHERE type='type' 				
<isNotEqual prepend="AND" property="mylist.conditionExt" compareValue="any">
  colExt=#mylist[].conditionExt#
</isNotEqual>
</iterate>

I have the same exception of course !

I did not really understand the previous solution, and where can i find the version 2.1.0 ? 

Thanks a lot

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>     Assignee: Brandon Goodin
>      Fix For: 2.1.0
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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


[jira] Updated: (IBATIS-42) ProbeException when iterate tag contains dynamic tags

Posted by "Jerome Jacobsen (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-42?page=history ]

Jerome Jacobsen updated IBATIS-42:
----------------------------------

    Attachment: IterateTest_JUnit.out

JUnit output showing Exception stack trace.

> ProbeException when iterate tag contains dynamic tags
> -----------------------------------------------------
>
>          Key: IBATIS-42
>          URL: http://issues.apache.org/jira/browse/IBATIS-42
>      Project: iBatis for Java
>         Type: Bug
>     Versions: 2.0.9
>  Environment: JDK 1.4.2_06
> Windows 2000 SP4
>     Reporter: Jerome Jacobsen
>  Attachments: DynamicAccount.xml, IterateTest.java, IterateTest_JUnit.out
>
> When upgrading my project from SqlMaps 1.3.1 to 2.0.9 I encountered this bug.  I modified the IterateTest JUnit test to reproduce it there.
> I've added this to DynamicAccount.xml:
>   <select id="dynamicQueryByExample2"
>     parameterClass="testdomain.Account"
>     resultClass="testdomain.Account">
>     select
>       ACC_ID          as id,
>       ACC_FIRST_NAME  as firstName,
>       ACC_LAST_NAME   as lastName,
>       ACC_EMAIL       as emailAddress
>     from ACCOUNT
>     <dynamic prepend="WHERE">
>       <isNotNull prepend="AND" property="ids">
>         <iterate property="ids" conjunction="OR">
>          <isNotNull property="ids">
>            ACC_ID = #ids[]#
>          </isNotNull>
>         </iterate>
>       </isNotNull>
>     </dynamic>
>   </select>
> And I've added this test in IterateTest.java:
>   public void testArrayPropertyIterate2() throws SQLException {
>     Account account = new Account();
>     account.setIds(new int[]{1, 2, 3});
>     List list = sqlMap.queryForList("dynamicQueryByExample2", account);
>     assertAccount1((Account) list.get(0));
>     assertEquals(3, list.size());
>   }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira