Hi team,
Just trying to get some clarification on this, as it's a bit of a
puzzler to me. I've trawled through the mail archive and I haven't
really been able to get anything that looks remotely similar to work.
My example is:
I have a JavaBean which is my base bean. A property of that JavaBean is a List, which contains a list of other JavaBeans. All properies (for both beans) are Strings. I'm trying to write an insert that will insert a row in a table with the same key in the base bean with the different data pulled out of the JavaBeans in the List.
I thought it would be something like:
Base Bean: private String scriptName; //getters and setters
JavaBean from the List of Beans: private String sequence; private String sql; //getters and setters
<statement id="insertBot" parameterClass="bot">
<dynamic>
<iterate property="sqlList">
insert into BOTS (NAME, SQL, SEQUENCE)
values (#scriptName#, #sqlList[].sql#, #sqlList[].sequence#)
</iterate>
</dynamic>
</statement>Clinton has said that the iterate tag isn't really designed for the above usage, so I guess it's time to refactor. Anyone have any suggestions?
Thanks,
Andrew

