Re: Nested Beans?

2005-04-12 Thread Nic Werner
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 [EMAIL PROTECTED] 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.
   




Re: Nested Beans?

2005-04-12 Thread Brandon Goodin
does your device bean have a setTag(...) method?

On Apr 12, 2005 12:44 PM, Nic Werner [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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.
 
 
 
 



Re: Nested Beans?

2005-04-12 Thread Nic Werner
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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.

   

   




Re: Nested Beans?

2005-04-12 Thread Larry Meadors
There is not a property named 'Tag' in class 'java.lang.String' only in your bean. :-D

Change the result maping.

LarryOn Apr 12, 2005 2:33 PM, Nic Werner [EMAIL PROTECTED] wrote:Yes,public void setTag(String value){tag = value; }Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLEproperty 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 [EMAIL PROTECTED] wrote:Thanks for the guidance Brandon, but I'm still lost after checkingeverything: I want this 'select' command to grab the deviceid, andpopulate 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=ReservationBeanclass=com.company.beans.dhcp.ReservationBeanresult property=ipAddress column=ipaddress/result property=device.tag column=deviceid//resultMapselect id=selectReservations resultMap=ReservationBeanSELECTdeviceid,ipaddressFROM dhcp_reservation/select-- Nic.Brandon Goodin wrote:You can use '.'(dot) notation. So, if you pass in Reservation asyour parameter class you can acess the device id with 'device.id'(assuming 'id' is the name of your id propety in the Device class)BrandonOn Apr 7, 2005 12:58 PM, Nic Werner [EMAIL PROTECTED] wrote:Greetings, The archives aren't searchable right now(http://incubator.apache.org/ibatis/site/mailinglists.html), so I havethis question:I have a Bean (Reservation), with another Bean (Device) inside it. Mydatabase just contains the DeviceID in the Reservation table - where/howcan I use the getter inside the nestedbean to get this DeviceID out?Thanks,- Nic.

Nested Beans?

2005-04-07 Thread Nic Werner
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.


Re: Nested Beans?

2005-04-07 Thread Brandon Goodin
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 [EMAIL PROTECTED] 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.