ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Glover <robertglove...@yahoo.com>
Subject re: Can anyone offer help on "There is no WRITEABLE property named 'lName'"
Date Wed, 22 Aug 2007 23:09:17 GMT
  Regarding Jeff Butler's Abator 1.0  suggestion to "use the <columnOverride>
element and set the property name yourself," (see synopsis further below), I
have one comment and one question:

one comment:

 The Abator 1.0 dtd (http://ibatis.apache.org/dtd/abator-config_1_0.dtd)
defines columnOverride this way:

<!ELEMENT columnOverride EMPTY>
<!ATTLIST columnOverride
  property CDATA #IMPLIED
  typeHandler CDATA #IMPLIED>

    I found the following to work perfectly for my needs. Thanks for pointing
me to this solution.

    <table schema="ATADMIN" tableName="IAT_HR_EMP">
       <columnOverride column="L_NAME" property="firstName"/>
       <columnOverride column="F_NAME" property="lastName"/>       

question one of one:

   I have two tables which Abator turns into the same class name, causing a
compile error because two classes cannot have the same name in the same
package.  The two table names are:  "IAV_EMP_LF_NAME" and "EMP_L_F_NAME".
Abator turns these into classes IavEmpLfName and IavEmpLFName, which the
compiler flags as a duplicate classname error.

I tried to change the name of the 2nd table as follows but it did not work: 

    <table schema="ATADMIN" tableName="EMP_L_F_NAME" alias="fooBar"/>

All the above did was change something inside ATADMIN_IAT_HR_EMP_SqlMap.xml.

     So my question is, other than renaming the 2nd table, is there any Abator
solution that will solve the problem of duplicate table class names?

> From: Robert Glover <robertgloverjr@yahoo.com>
> Subject: Can anyone offer help on  "There is no WRITEABLE property named
> 'lName'"
> To: user-java@ibatis.apache.org
> I'm at my wits end, tearing my hair out over this problem.
> I use Abator to generate all my IBatis classes and XML.
> When my Spring web app starts up I get this error:
> Error parsing XPath '/sqlMap/resultMap/result'.
> Cause: com.ibatis.common.beans.ProbeException:
> There is no WRITEABLE property named 'lName' in class
> 'frb.bsd.abator.domain.IavAssetInfo2'


> The abator generated set statements look okay to me. Here is one of them.
> I don't see how this would cause the problem, so I'm at my wits end.
>     /**
>      * This method was generated by Abator for iBATIS.
>      * This method sets the value of the database column
>      *
>      * @param lName the value for ATADMIN.IAV_ASSET_INFO2.L_NAME
>      *
>      * @abatorgenerated Fri Aug 17 15:06:09 EDT 2007
>      */
>     public void setLName(String lName) {
>         this.lName = lName;
>     }


> > From: "Clinton Begin" <clinton.begin@gmail.com>
> To: <user-java@ibatis.apache.org>
> Subject: RE: Can anyone offer help on  "There is no WRITEABLE property named
> 'lName'"
> Date: Fri, 17 Aug 2007 16:33:12 -0600
> The property name would be LName.
> Javabeans is a screwy spec.  Thanks to the capitalization rules, if you have
> two uppercase letters at the beginning of a property name, it doesn't change
> the case.

> > Date: Sat, 18 Aug 2007 08:13:15 -0500
> From: "Jeff Butler" <jeffgbutler@gmail.com>
> To: user-java@ibatis.apache.org
> Subject: Re: Can anyone offer help on "There is no WRITEABLE property named
> 'lName'"
> I agree with the rant!
> Abator 1.0 has some issues (bugs) with these strange column names.  They are
> fixed now in SVN, so you could build it from scratch and things would be
> better.  Or, you could use the <columnOverride> element and set the property
> name yourself.
> I really must do a new release of Abator sometime soon.
> Jeff Butler

View raw message