Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 69747 invoked from network); 23 Aug 2007 03:14:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Aug 2007 03:14:34 -0000 Received: (qmail 45953 invoked by uid 500); 23 Aug 2007 03:14:29 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 45935 invoked by uid 500); 23 Aug 2007 03:14:29 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 45924 invoked by uid 99); 23 Aug 2007 03:14:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 20:14:29 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeffgbutler@gmail.com designates 209.85.198.190 as permitted sender) Received: from [209.85.198.190] (HELO rv-out-0910.google.com) (209.85.198.190) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 03:14:29 +0000 Received: by rv-out-0910.google.com with SMTP id c27so261980rvf for ; Wed, 22 Aug 2007 20:14:08 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Z9IuqyJfwqalIOmpoMbMA3BCClcgCAICsZ7VbnTHje9R+10tz2bGfFwvGRmLZw5LlnZHERRZcLJHcUtR85hfKejRsfJPigF5BuVe3GIOJp+PzSu3OEDwX1rlT6yrd+rmvhS1xwvlp9aXUyOnSWIWrMP8C2WDiExA4PAWIJCIZSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=IKAV4SZfBYKwpZsgwSmpECNSkX6YwzBj/GC0g/sF7ZsBoXcg5Hab4xwu/4uVaBol/6kszg/vQxmTKZZ9ZXuJLK2YU1zDyVnqpG5U38Po4ShRWUCYOfZRgz9BYE51UGOMhRHVLaNyInHvd29TqBlDEegURXkBOry8GTZZDEi8k4Y= Received: by 10.115.106.7 with SMTP id i7mr1590394wam.1187838848672; Wed, 22 Aug 2007 20:14:08 -0700 (PDT) Received: by 10.115.111.12 with HTTP; Wed, 22 Aug 2007 20:14:06 -0700 (PDT) Message-ID: Date: Wed, 22 Aug 2007 22:14:08 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: Can anyone offer help on "There is no WRITEABLE property named 'lName'" In-Reply-To: <719540.45640.qm@web30804.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_111757_11551389.1187838848629" References: <719540.45640.qm@web30804.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_111757_11551389.1187838848629 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sure - use the "domainObjectName" attribute of the element - this way, you can name the generated objects anything you wish. It's like rename for a table. Jeff Butler On 8/22/07, Robert Glover wrote: > > Regarding Jeff Butler's Abator 1.0 suggestion to "use the > > 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: > > > column CDATA #REQUIRED > property CDATA #IMPLIED > javaType CDATA #IMPLIED > jdbcType CDATA #IMPLIED > typeHandler CDATA #IMPLIED> > > I found the following to work perfectly for my needs. Thanks for > pointing > me to this solution. > >
> > >
> > 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: > > > > 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 > > 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' > > ...snip... > > > 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 > > ATADMIN.IAV_ASSET_INFO2.L_NAME > > * > > * @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; > > } > > ...snip... > > > > From: "Clinton Begin" > > To: > > 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. > > ...snip... > > > > Date: Sat, 18 Aug 2007 08:13:15 -0500 > > From: "Jeff Butler" > > 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 element and set the > property > > name yourself. > > > > I really must do a new release of Abator sometime soon. > > > > Jeff Butler > > > > 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 element and set the > property > name yourself. > > I really must do a new release of Abator sometime soon. > > Jeff Butler > > > > On 8/17/07, Clinton Begin wrote: > > > > 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. > > > > > > God forbid they just leave the damn capitalization as it is typed in the > > first place. Would TitleCase properties have killed us all? > > > > > > Does anyone think iBATIS 3 should be completely case insensitive in this > > regard? Really, do you ever have a need to differentiate two properties > > only by case? > > > > Clinton > > > > -----Original Message----- > > From: Robert Glover [mailto:robertgloverjr@yahoo.com] > > Sent: August-17-07 3:48 PM > > To: user-java@ibatis.apache.org > > Subject: Can anyone offer help on "There is no WRITEABLE property named > > 'lName'" > > > > 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' > > > > I have 27 tables, so I tried commenting out the offending table to see > > what > > would happen then. What happened is I got the same error but on a > > different > > table. That different table also had an "lName" property. > > > > I did a lot of google-ing and most times this problem is because > manually > > created iBatis XML has the wrong capitalization. But I did not write > any > > of > > this, abator did. > > > > The offending tables have underscores in their table name, which > Abator > > removes. I don't think that is it. However in addition to that, the > > column > > names in the tables have underscores. The offending field, "lName", is > > actually defined in the Oracle 10g database as "L_NAME". > > > > 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 > > ATADMIN.IAV_ASSET_INFO2.L_NAME > > * > > * @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; > > } > > > > > > > > > > > > > > > > > ------=_Part_111757_11551389.1187838848629 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Sure - use the "domainObjectName" attribute of the <table> element - this way, you can name the generated objects anything you wish.  It's like rename for a table.
 
Jeff Butler
 


On 8/22/07, Robert Glover <robertgloverjr@yahoo.com> wrote:
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
column CDATA #REQUIRED
property CDATA #IMPLIED
javaType CDATA #IMPLIED
jdbcType 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"/>
   </table>

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'

...snip...

> 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
> ATADMIN.IAV_ASSET_INFO2.L_NAME
>      *
>      * @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;
>     }

...snip...

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

...snip...

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

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



On 8/17/07, Clinton Begin < clinton.begin@gmail.com> wrote:
>
> 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.
>
> <rant>
> God forbid they just leave the damn capitalization as it is typed in the
> first place.  Would TitleCase properties have killed us all?
> </rant>
>
> Does anyone think iBATIS 3 should be completely case insensitive in this
> regard?  Really, do you ever have a need to differentiate two properties
> only by case?
>
> Clinton
>
> -----Original Message-----
> From: Robert Glover [mailto:robertgloverjr@yahoo.com]
> Sent: August-17-07 3:48 PM
> To: user-java@ibatis.apache.org
> Subject: Can anyone offer help on "There is no WRITEABLE property named
> 'lName'"
>
> 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'
>
> I have 27 tables, so I tried commenting out the offending table to see
> what
> would happen then.  What happened is I got the same error but on a
> different
> table.  That different table also had an "lName" property.
>
> I did a lot of google-ing and most times this problem  is because manually
> created iBatis XML has the wrong capitalization.  But I did not write any
> of
> this, abator did.
>
>   The offending tables have underscores in their table name, which Abator
> removes.  I don't think that is it.  However in addition to that, the
> column
> names in the tables have underscores.  The offending field, "lName", is
> actually defined in the Oracle 10g database as "L_NAME".
>
>    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
> ATADMIN.IAV_ASSET_INFO2.L_NAME
>     *
>     * @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;
>    }
>
>
>
>
>
>
>



------=_Part_111757_11551389.1187838848629--