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 <[EMAIL PROTECTED]>
> Subject: Can anyone offer help on  "There is no WRITEABLE property named
> 'lName'"
> To: [email protected]
> 
> 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" <[EMAIL PROTECTED]>
> To: <[email protected]>
> 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" <[EMAIL PROTECTED]>
> To: [email protected]
> 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
> 
Imho sequence you are getting indicates something is wrong with your
batching. If it were batch inserts you should not have statemnets
prepared each time irrespective of statementCachingEnabled setting.

GL,

Koka
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;
    }

    




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:[EMAIL PROTECTED] 
Sent: August-17-07 3:48 PM
To: [email protected]
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;
    }

    




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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> Sent: August-17-07 3:48 PM
> To: [email protected]
> 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;
>    }
>
>
>
>
>
>
>
On 8/17/07, Clinton Begin <[EMAIL PROTECTED]> wrote:
> <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>

I'll take the rant a step further. :-)

Why do we need the stupid methods in the first place? The whole idea
of making getStupid/setStupid methods to define properties is utterly
retarded.

In 1995, M$ had a language that defined properties the same way C#
does now. It's not really a novel idea to make them fields with an
option to wrap access to the fields using get/set methods.

Why Sun didn't do this is beyond me.

What they managed to do instead was create a specification that forces
developers to create non-transparent fields - instead of making a
statement like "bean.prop = 5;" we have to do "bean.setProp(5);".

Any OOP zealot will tell you that this breaks one of the first 3 rules
of OOP (encapsulation) because you have to know the implementation -
is it a property, or just a field?

So, here we are 12 years later, and we *still* have to do this. Why?!?

There is *no* reason to keep the spec the same - it could easily be
extended to allow for declarative properties using annotations, or
even simpler (for us) by changing the VM to look for get/set methods
before changing field values directly.

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

I think that's a fine idea...in fact, I think I have a BeanUtils like
class that does that now somewhere...

Larry
I could make classinfo case insensitive with only a few line changes.  :-)
I guess we wouldn't be breaking compatibility for anyone except the one
person on earth who has both a getXMLText() and getXmlText().  But that
person should be terminated anyway.  ;-)

Cheers,
Clinton

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Larry Meadors
Sent: August-18-07 7:41 AM
To: [email protected]
Subject: Re: Can anyone offer help on "There is no WRITEABLE property named
'lName'"

On 8/17/07, Clinton Begin <[EMAIL PROTECTED]> wrote:
> <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>

I'll take the rant a step further. :-)

Why do we need the stupid methods in the first place? The whole idea
of making getStupid/setStupid methods to define properties is utterly
retarded.

In 1995, M$ had a language that defined properties the same way C#
does now. It's not really a novel idea to make them fields with an
option to wrap access to the fields using get/set methods.

Why Sun didn't do this is beyond me.

What they managed to do instead was create a specification that forces
developers to create non-transparent fields - instead of making a
statement like "bean.prop = 5;" we have to do "bean.setProp(5);".

Any OOP zealot will tell you that this breaks one of the first 3 rules
of OOP (encapsulation) because you have to know the implementation -
is it a property, or just a field?

So, here we are 12 years later, and we *still* have to do this. Why?!?

There is *no* reason to keep the spec the same - it could easily be
extended to allow for declarative properties using annotations, or
even simpler (for us) by changing the VM to look for get/set methods
before changing field values directly.

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

I think that's a fine idea...in fact, I think I have a BeanUtils like
class that does that now somewhere...

Larry

Reply via email to