You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Andreas Voss (JIRA)" <ib...@incubator.apache.org> on 2006/11/22 13:17:01 UTC

[jira] Created: (IBATIS-370) no WRITABLE property with camel case properties

no WRITABLE property with camel case properties
-----------------------------------------------

                 Key: IBATIS-370
                 URL: http://issues.apache.org/jira/browse/IBATIS-370
             Project: iBatis for Java
          Issue Type: Bug
          Components: Tools
    Affects Versions: 2.2.0
            Reporter: Andreas Voss


I have a property in my domain model with getter/setter

int xAxis
int getXAxis()
void setXAxis(int x)

in the sqlmap there is a resultmap with result property="xAxis".

This causes the "no WRITABLE property" error. In ClassInfo.getSetterType() iBatis looks for a setter of the property  "xAxis" in the map setTypes contains "XAxis" - so its not found.

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

        

Re: [jira] Closed: (IBATIS-370) no WRITABLE property with camel case properties

Posted by Larry Meadors <lm...@apache.org>.
I think so, yeah.

On 11/22/06, Jeff Butler <je...@gmail.com> wrote:
> Wierd.  Did you check to see if iBATIS works that way too?  iBATIS isn't
> using Introspector.
>
> Jeff Butler
>
>
>
> On 11/22/06, Larry Meadors <lm...@apache.org> wrote:
> > Not really: getxAxis will make a property named "xAxis".
> >
> > ===
> > public class BeanName extends TestCase {
> >    public void test() throws Exception {
> >        BeanInfo info = Introspector.getBeanInfo(TestBean.class);
> >        PropertyDescriptor[] propertyDescriptors =
> > info.getPropertyDescriptors();
> >        for(PropertyDescriptor pd : propertyDescriptors){
> >            System.out.println(pd.getName());
> >        }
> >    }
> >    public class TestBean{
> >        String xAxis;
> >        public String getxAxis() {return xAxis;}
> >        public void setxAxis(String xAxis) {this.xAxis = xAxis;}
> >    }
> >
> > }
> > ===
> > Output is:
> > class
> > xAxis
> >
> > You can *not* define a property named Xaxis, however. :-)
> >
> > Larry
> >
> > On 11/22/06, Jeff Butler (JIRA) < ibatis-dev@incubator.apache.org> wrote:
> > >      [
> http://issues.apache.org/jira/browse/IBATIS-370?page=all ]
> > >
> > > Jeff Butler closed IBATIS-370.
> > > ------------------------------
> > >
> > >     Resolution: Invalid
> > >
> > > This isn't a bug - it is a peculiarity in the Javabeans spec.  It turns
> out that it is impossible to have a property with only the first letter
> being lower case.  You must specify the property as "XAxis".
> > >
> > > Please use the mailing lists to ask questions before submitting a bug.
> > >
> > >
> > > > no WRITABLE property with camel case properties
> > > > -----------------------------------------------
> > > >
> > > >                 Key: IBATIS-370
> > > >                 URL:
> http://issues.apache.org/jira/browse/IBATIS-370
> > > >             Project: iBatis for Java
> > > >          Issue Type: Bug
> > > >          Components: Tools
> > > >    Affects Versions: 2.2.0
> > > >            Reporter: Andreas Voss
> > > >
> > > > I have a property in my domain model with getter/setter
> > > > int xAxis
> > > > int getXAxis()
> > > > void setXAxis(int x)
> > > > in the sqlmap there is a resultmap with result property="xAxis".
> > > > This causes the "no WRITABLE property" error. In
> ClassInfo.getSetterType() iBatis looks for a setter of the property  "xAxis"
> in the map setTypes contains "XAxis" - so its not found.
> > >
> > > --
> > > 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
> > >
> > >
> > >
> >
>
>

Re: [jira] Closed: (IBATIS-370) no WRITABLE property with camel case properties

Posted by Jeff Butler <je...@gmail.com>.
Wierd.  Did you check to see if iBATIS works that way too?  iBATIS isn't
using Introspector.

Jeff Butler


On 11/22/06, Larry Meadors <lm...@apache.org> wrote:
>
> Not really: getxAxis will make a property named "xAxis".
>
> ===
> public class BeanName extends TestCase {
>    public void test() throws Exception {
>        BeanInfo info = Introspector.getBeanInfo(TestBean.class);
>        PropertyDescriptor[] propertyDescriptors =
> info.getPropertyDescriptors();
>        for(PropertyDescriptor pd : propertyDescriptors){
>            System.out.println(pd.getName());
>        }
>    }
>    public class TestBean{
>        String xAxis;
>        public String getxAxis() {return xAxis;}
>        public void setxAxis(String xAxis) {this.xAxis = xAxis;}
>    }
>
> }
> ===
> Output is:
> class
> xAxis
>
> You can *not* define a property named Xaxis, however. :-)
>
> Larry
>
> On 11/22/06, Jeff Butler (JIRA) <ib...@incubator.apache.org> wrote:
> >      [ http://issues.apache.org/jira/browse/IBATIS-370?page=all ]
> >
> > Jeff Butler closed IBATIS-370.
> > ------------------------------
> >
> >     Resolution: Invalid
> >
> > This isn't a bug - it is a peculiarity in the Javabeans spec.  It turns
> out that it is impossible to have a property with only the first letter
> being lower case.  You must specify the property as "XAxis".
> >
> > Please use the mailing lists to ask questions before submitting a bug.
> >
> >
> > > no WRITABLE property with camel case properties
> > > -----------------------------------------------
> > >
> > >                 Key: IBATIS-370
> > >                 URL: http://issues.apache.org/jira/browse/IBATIS-370
> > >             Project: iBatis for Java
> > >          Issue Type: Bug
> > >          Components: Tools
> > >    Affects Versions: 2.2.0
> > >            Reporter: Andreas Voss
> > >
> > > I have a property in my domain model with getter/setter
> > > int xAxis
> > > int getXAxis()
> > > void setXAxis(int x)
> > > in the sqlmap there is a resultmap with result property="xAxis".
> > > This causes the "no WRITABLE property" error. In
> ClassInfo.getSetterType() iBatis looks for a setter of the
> property  "xAxis" in the map setTypes contains "XAxis" - so its not found.
> >
> > --
> > 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
> >
> >
> >
>

Re: [jira] Closed: (IBATIS-370) no WRITABLE property with camel case properties

Posted by Larry Meadors <lm...@apache.org>.
Not really: getxAxis will make a property named "xAxis".

===
public class BeanName extends TestCase {
    public void test() throws Exception {
        BeanInfo info = Introspector.getBeanInfo(TestBean.class);
        PropertyDescriptor[] propertyDescriptors =
info.getPropertyDescriptors();
        for(PropertyDescriptor pd : propertyDescriptors){
            System.out.println(pd.getName());
        }
    }
    public class TestBean{
        String xAxis;
        public String getxAxis() {return xAxis;}
        public void setxAxis(String xAxis) {this.xAxis = xAxis;}
    }

}
===
Output is:
class
xAxis

You can *not* define a property named Xaxis, however. :-)

Larry

On 11/22/06, Jeff Butler (JIRA) <ib...@incubator.apache.org> wrote:
>      [ http://issues.apache.org/jira/browse/IBATIS-370?page=all ]
>
> Jeff Butler closed IBATIS-370.
> ------------------------------
>
>     Resolution: Invalid
>
> This isn't a bug - it is a peculiarity in the Javabeans spec.  It turns out that it is impossible to have a property with only the first letter being lower case.  You must specify the property as "XAxis".
>
> Please use the mailing lists to ask questions before submitting a bug.
>
>
> > no WRITABLE property with camel case properties
> > -----------------------------------------------
> >
> >                 Key: IBATIS-370
> >                 URL: http://issues.apache.org/jira/browse/IBATIS-370
> >             Project: iBatis for Java
> >          Issue Type: Bug
> >          Components: Tools
> >    Affects Versions: 2.2.0
> >            Reporter: Andreas Voss
> >
> > I have a property in my domain model with getter/setter
> > int xAxis
> > int getXAxis()
> > void setXAxis(int x)
> > in the sqlmap there is a resultmap with result property="xAxis".
> > This causes the "no WRITABLE property" error. In ClassInfo.getSetterType() iBatis looks for a setter of the property  "xAxis" in the map setTypes contains "XAxis" - so its not found.
>
> --
> 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
>
>
>

[jira] Closed: (IBATIS-370) no WRITABLE property with camel case properties

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-370?page=all ]

Jeff Butler closed IBATIS-370.
------------------------------

    Resolution: Invalid

This isn't a bug - it is a peculiarity in the Javabeans spec.  It turns out that it is impossible to have a property with only the first letter being lower case.  You must specify the property as "XAxis".

Please use the mailing lists to ask questions before submitting a bug.


> no WRITABLE property with camel case properties
> -----------------------------------------------
>
>                 Key: IBATIS-370
>                 URL: http://issues.apache.org/jira/browse/IBATIS-370
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 2.2.0
>            Reporter: Andreas Voss
>
> I have a property in my domain model with getter/setter
> int xAxis
> int getXAxis()
> void setXAxis(int x)
> in the sqlmap there is a resultmap with result property="xAxis".
> This causes the "no WRITABLE property" error. In ClassInfo.getSetterType() iBatis looks for a setter of the property  "xAxis" in the map setTypes contains "XAxis" - so its not found.

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