[ http://issues.apache.org/jira/browse/IBATIS-361?page=comments#action_12445944 ] Christian Poitras commented on IBATIS-361: ------------------------------------------
While the validation is made, a property #orConditions[0].conditions[0].condition# cannot be parsed correctly. Even when forcing ClassInfo to return Object.class when an indexed property is found does not stop validation for subproperty conditions[0] and will generate an exception. In the validation process, there should be a way to stop property validation in a List property since class of objects in List cannot be known before run time. > Problem addressing list index in a parameter declaration > --------------------------------------------------------- > > Key: IBATIS-361 > URL: http://issues.apache.org/jira/browse/IBATIS-361 > Project: iBatis for Java > Issue Type: Bug > Components: SQL Maps > Affects Versions: 2.2.0 > Reporter: Reuben Firmin > > I have the following code: > public class Buyer > { > ... > private Address mailingAddress; > > ... > public class Address > { > private List<String> addressLine; > ... > public List<String> getAddressLine() > { > In my insert statement, I'm addressing this as: > #mailingAddress.addressLine[0]#, #mailingAddress.addressLine[1]#, > When I start the webapp, I'm getting this exception: > ... > [11:08:02.736] Caused by: com.ibatis.common.beans.ProbeException: There is no > READABLE property named 'addressLine[0]' in class > 'com.copart.c2.buyer.bo.Address' > [11:08:02.736] at > com.ibatis.common.beans.ClassInfo.getGetterType(ClassInfo.java:240) > [11:08:02.736] at > com.ibatis.common.beans.GenericProbe.getClassPropertyTypeForGetter(GenericProbe.java:221) > [11:08:02.736] at > com.ibatis.common.beans.GenericProbe.getPropertyTypeForGetter(GenericProbe.java:153) > [11:08:02.736] at > com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser.resolveTypeHandler(InlineParameterMapParser.java:229) > [11:08:02.736] at > com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser.newParseMapping(InlineParameterMapParser.java:138) > [11:08:02.736] at > com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser.parseInlineParameterMap(InlineParameterMapParser.java:50) > [11:08:02.736] at > com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.applyInlineParameterMap(SqlStatementParser.java:428) > [11:08:02.736] at > com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.processSqlStatement(SqlStatementParser.java:216) > [11:08:02.736] at > com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:121) > [11:08:02.736] at > com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$19.process(SqlMapParser.java:553) > [11:08:02.736] at > com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:111) > I will debug further and will append to this bug. -- 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