ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nic Werner <wer...@sonoma.edu>
Subject Re: Nested Beans?
Date Tue, 12 Apr 2005 20:33:11 GMT
Yes,  public void setTag(String value){tag = value; }       

Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLE 
property named 'Tag' in class 'java.lang.String'

I tried changing the capitalization and same response.

Brandon Goodin wrote:

>does your device bean have a setTag(...) method?
>
>On Apr 12, 2005 12:44 PM, Nic Werner <werner@sonoma.edu> wrote:
>  
>
>>Thanks for the guidance Brandon, but I'm still lost after checking
>>everything: I want this 'select' command to grab the deviceid, and
>>populate the DeviceBean using this unique tag, is that possible?
>>
>>ReservationBean holds a DeviceBean. The DB table has a field called
>>'DeviceID' which should refer to the DeviceBean.getTag()
>>
>>I get the error:  Caused by: com.ibatis.common.beans.ProbeException:
>>There is no WRITEABLE property named 'tag' in class 'java.lang.String'
>>
>>Snippet of my ReservationBean:
>>public final class ReservationBean extends ActionForm {
>>
>>        private String ipAddress="";
>>        private DeviceBean device = new DeviceBean();
>>....
>>
>>Reservation.xml:
>><resultMap id="ReservationBean"
>>class="com.company.beans.dhcp.ReservationBean">
>>        <result property="ipAddress" column="ipaddress"/>
>>        <result property="device.tag" column="deviceid"/>
>>    </resultMap>
>>    <select id="selectReservations" resultMap="ReservationBean">
>>        SELECT
>>            deviceid,
>>            ipaddress
>>        FROM dhcp_reservation
>>    </select>
>>---------------------
>>
>>- Nic.
>>
>>
>>Brandon Goodin wrote:
>>
>>    
>>
>>>You can use '.'  (dot) notation. So, if you pass in Reservation as
>>>your parameter class you can acess the device id with 'device.id'
>>>(assuming 'id' is the name of your id propety in the Device class)
>>>
>>>Brandon
>>>
>>>On Apr 7, 2005 12:58 PM, Nic Werner <werner@sonoma.edu> wrote:
>>>
>>>
>>>      
>>>
>>>>Greetings,
>>>>   The archives aren't searchable right now
>>>>(http://incubator.apache.org/ibatis/site/mailinglists.html), so I have
>>>>this question:
>>>>
>>>>I have a Bean (Reservation), with another Bean (Device) inside it. My
>>>>database just contains the DeviceID in the Reservation table - where/how
>>>>can I use the getter inside the nestedbean to get this DeviceID out?
>>>>
>>>>Thanks,
>>>>
>>>>- Nic.
>>>>
>>>>
>>>>
>>>>        
>>>>
>>    
>>


Mime
View raw message