[ 
http://issues.apache.org/jira/browse/IBATIS-184?page=comments#action_12331494 ] 

Jim Krygowski commented on IBATIS-184:
--------------------------------------

Hi Clinton-

That's fine.  I was basing the bug report on the documentation which seemed to 
indicate that this was a usage model iBatis supported.  What does the 
documentation mean by this?:

<quote>
Side Bar: Object Graph Navigation (JavaBeans Properties, Maps, Lists)
Throughout this document you may have seen objects accessed through a special 
syntax that might be familiar to anyone who has used Struts or any other 
JavaBeans compatible framework. The Data Mapper framework allows object graphs 
to be navigated via JavaBeans properties, Maps (key/value) and Lists.
Consider the following navigation (includes a List, a Map and a JavaBean): 
Employee emp = getSomeEmployeeFromSomewhere();
((Address) ( (Map)emp.getDepartmentList().get(3) ).get ("address")).getCity();

This property of the employee object could be navigated in an SqlMapClient 
property (ResultMap, ParameterMap etc...) as follows (given the employee object 
as above):
"departmentList[3].address.city"
</quote>

Clearly, from your comment, this is unsupported.  Maybe this should be removed 
from the documentation?


> ProbeException: There is no WRITEABLE property when using 
> property[0].subproperty notation in ResultMap
> -------------------------------------------------------------------------------------------------------
>
>          Key: IBATIS-184
>          URL: http://issues.apache.org/jira/browse/IBATIS-184
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9, 2.1.5
>  Environment: Windows 2000/XP, JDK 1.5
>     Reporter: Jim Krygowski
>     Assignee: Clinton Begin

>
> I'm getting the following error:
> com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 
> 'requests[0]' in class 'com.saishintechnology.dto.Patient'
>       at com.ibatis.common.beans.ClassInfo.getSetterType(ClassInfo.java:174)
>       at 
> com.ibatis.common.beans.GenericProbe.getClassPropertyTypeForSetter(GenericProbe.java:229)
> when I try to use an extended type property mapping in my ResultMap.  The 
> property mapping looks like this:
> <result property="requests[0].treatment" column="PlanTreatment"/>
> The javabean/pojo's getters/setters follow the JavaBeans indexed property 
> conventions:
>     public void setRequests(int argIndex, Request)...
>     public void addRequest(Request argRequest)...
>     public List<Request> getRequests()...
>     public Request getRequests(int argIndex)...
> I notice that when the ClassInfo getSetterType method is invoked it uses 
> requests[0] as the property type.  I think that the [0] should have been 
> stripped out at this point.  Is this a bug or am I missing something from 
> either my pojo or the result property configuration?  

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

Reply via email to