You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jim Krygowski (JIRA)" <ib...@incubator.apache.org> on 2005/08/27 17:36:05 UTC

[jira] Commented: (IBATIS-184) ProbeException: There is no WRITEABLE property when using property[0].subproperty notation in ResultMap

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

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

I noticed that my code sample included a list management helper method (add)  instead of the proper javabean compliant setter.  That was a bug report entry mistake on my part.  The correct setter does exist in the code exhibiting the bug I've logged.  The corrected example of the accesors and mutators follows:

public void setRequests(List<Request> argRequests)...
public void setRequests(int argIndex, Request argRequest)...
public List<Request> getRequests()...
public Request getRequests(int argIndex)....

> 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

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