The issue is that attribute names are not explicitly kept in synch with the method names in the generated objects. Explicitly keeping attribute names in synch with method names, according to bean specifications, allows the generated objects to be used as beans - according to the simplest meaning of the term "bean", i.e., that an attribute has accessors/setters whose name matches the attribute name according to certain rules.... We ran across this when we tried to use the setProperties method of the Turbine ParameterParser class - which uses java.beans.Introspector. We've been using a patched version of Torque for some time that addresses this issue and would like to integrate it permanently. The change involves adding a getJavaAttrName method to the Column object that uses the Introspector.decapitalize method on the the result of the getJavaName method (which follows the javaNamingMethod setting) to produce a bean compliant attribute name that is explicitly synched with the name used for the methods. In the om templates change to reflect this - from $clo=$col.Name.toLowerCase() to $cdc=$col.JavaAttrName. I've attached a patch to facilitate quick acceptance. Index: src/java/org/apache/torque/engine/database/model/Column.java =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java,v retrieving revision 1.22 diff -u -r1.22 Column.java --- src/java/org/apache/torque/engine/database/model/Column.java 8 May 2002 19:45:45 -0000 1.22 +++ src/java/org/apache/torque/engine/database/model/Column.java 2 Aug 2002 14:30:02 +-0000 @@ -54,6 +54,8 @@ * <http://www.apache.org/>. */ +import java.beans.Introspector; + import java.util.ArrayList; import java.util.Date; import java.util.Hashtable; @@ -78,6 +80,7 @@ private String name; private String description; private String javaName = null; + private String javaAttrName = null; private String javaNamingMethod; private boolean isNotNull = false; private String size; @@ -263,8 +266,8 @@ inputs.add(javaNamingMethod); try { - javaName = NameFactory.generateName(NameFactory.JAVA_GENERATOR, - inputs); + setJavaName(NameFactory.generateName(NameFactory.JAVA_GENERATOR, + inputs)); } catch (EngineException e) { @@ -281,6 +284,28 @@ { this.javaName = javaName; } + + /** + * Get attribute name corresponding to the current class name + * represented by JavaName - this supports usage as a bean + */ + public String getJavaAttrName() + { + if (javaAttrName == null) + { + setJavaAttrName(Introspector.decapitalize(this.getJavaName())); + } + return javaAttrName; + } + + /** + * Set attribute name corresponding to the current class name + * represented by JavaName - this supports usage as a bean + */ + public void setJavaAttrName(String javaAttrName) + { + this.javaAttrName = javaAttrName; + } /** * Get type to use in Java sources Index: src/templates/om/ObjectWithManager.vm =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm,v retrieving revision 1.23 diff -u -r1.23 ObjectWithManager.vm --- src/templates/om/ObjectWithManager.vm 1 Aug 2002 16:51:38 -0000 1.23 +++ src/templates/om/ObjectWithManager.vm 2 Aug 2002 14:31:07 -0000 @@ -73,7 +73,7 @@ #if (!$table.isAlias()) #foreach ($col in $table.Columns) #set ( $cjtype = $col.JavaNative ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ($defVal = "") #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") ) #set ( $quote = '' ) @@ -105,14 +105,14 @@ #end /** - * The value for the $clo field + * The value for the $cdc field */ - private $cjtype $clo$defVal; + private $cjtype $cdc$defVal; #end #foreach ($col in $table.Columns) #set ( $cfc=$col.JavaName ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) /** @@ -121,7 +121,7 @@ */ public $cjtype get${cfc}() { - return $clo; + return $cdc; } #set ( $throwsClause = "" ) @@ -163,17 +163,17 @@ #if ( ($cjtype == "int") || ($cjtype == "long") || ($cjtype == "boolean") || ($cjtype == "short") || ($cjtype == "float") || ($cjtype == "double") || ($cjtype == "char") || ($cjtype == "byte") ) - if (this.$clo != v) + if (this.$cdc != v) { #else - if ( !ObjectUtils.equals(this.$clo, v) ) + if ( !ObjectUtils.equals(this.$cdc, v) ) { #end - this.$clo = v; + this.$cdc = v; setModified(true); } #else - this.$clo = v; + this.$cdc = v; #end #if ($complexObjectModel) @@ -299,7 +299,7 @@ #foreach ($columnName in $fk.LocalColumns) #set ( $column = $table.getColumn($columnName) ) #set ( $cjtype = $column.JavaNative ) - #set ( $clo=$column.Name.toLowerCase() ) + #set ( $cdc=$column.JavaAttrName ) #if ($cjtype == "short" || $cjtype == "int" || $cjtype == "long") #set ( $conditional = "$conditional${and}get${column.JavaName}()>0" ) #else @@ -1086,10 +1086,10 @@ #end #end - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) - #set ($argList = "${argList}$comma $cjtype $clo") - #set ($argList2 = "${argList2}$comma String $clo") + #set ($argList = "${argList}$comma $cjtype $cdc") + #set ($argList2 = "${argList2}$comma String $cdc") #set ( $comma = "," ) #end @@ -1097,16 +1097,16 @@ #if ($table.PrimaryKeys.size() == 1) #set ($col = $table.PrimaryKeys.get(0) ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) /** * Set the PrimaryKey using ObjectKey. * - * @param ObjectKey $clo + * @param ObjectKey $cdc */ - public void setPrimaryKey(ObjectKey $clo) + public void setPrimaryKey(ObjectKey $cdc) $throwsClause { - set${col.JavaName}(($cjtype)$clo); + set${col.JavaName}(($cjtype)$cdc); } /** @@ -1138,15 +1138,15 @@ * Set the PrimaryKey using SimpleKeys. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) - * @param $cjtype $clo + * @param $cjtype $cdc #end */ public void setPrimaryKey($argList) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}($col.Name.toLowerCase()); + set${col.JavaName}($col.JavaAttrName); #end } @@ -1154,14 +1154,14 @@ * Set the PrimaryKey with Strings. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) - * @param String $clo + #set ( $cdc=$col.JavaAttrName ) + * @param String $cdc #end */ public void setPrimaryKey($argList2) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}(new ${col.JavaNative}($col.Name.toLowerCase())); + set${col.JavaName}(new ${col.JavaNative}($col.JavaAttrName)); #end } @@ -1252,7 +1252,7 @@ $table.JavaName copyObj = new ${table.JavaName}(); #end #foreach ($col in $table.Columns) - copyObj.set${col.JavaName}($col.Name.toLowerCase()); + copyObj.set${col.JavaName}($col.JavaAttrName); #end #if ($complexObjectModel) Index: src/templates/om/Object.vm =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/om/Object.vm,v retrieving revision 1.45 diff -u -r1.45 Object.vm --- src/templates/om/Object.vm 1 Aug 2002 16:51:38 -0000 1.45 +++ src/templates/om/Object.vm 2 Aug 2002 14:31:07 -0000 @@ -73,7 +73,7 @@ #if (!$table.isAlias()) #foreach ($col in $table.Columns) #set ( $cjtype = $col.JavaNative ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ($defVal = "") #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") ) #set ( $quote = '' ) @@ -105,14 +105,14 @@ #end /** - * The value for the $clo field + * The value for the $cdc field */ - private $cjtype $clo$defVal; + private $cjtype $cdc$defVal; #end #foreach ($col in $table.Columns) #set ( $cfc=$col.JavaName ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) /** @@ -122,7 +122,7 @@ */ public $cjtype get${cfc}() { - return $clo; + return $cdc; } #set ( $throwsClause = "" ) @@ -166,17 +166,17 @@ #if ( ($cjtype == "int") || ($cjtype == "long") || ($cjtype == "boolean") || ($cjtype == "short") || ($cjtype == "float") || ($cjtype == "double") || ($cjtype == "char") || ($cjtype == "byte") ) - if (this.$clo != v) + if (this.$cdc != v) { #else - if (!ObjectUtils.equals(this.$clo, v)) + if (!ObjectUtils.equals(this.$cdc, v)) { #end - this.$clo = v; + this.$cdc = v; setModified(true); } #else - this.$clo = v; + this.$cdc = v; #end #if ($complexObjectModel) @@ -299,13 +299,13 @@ #foreach ($columnName in $fk.LocalColumns) #set ( $column = $table.getColumn($columnName) ) #set ( $cjtype = $column.JavaNative ) - #set ( $clo=$column.Name.toLowerCase() ) + #set ( $cdc=$column.JavaAttrName ) #if ($cjtype == "short" || $cjtype == "int" || $cjtype == "long") - #set ( $conditional = "$conditional${and}this.${clo}>0" ) + #set ( $conditional = "$conditional${and}this.${cdc}>0" ) #else - #set ( $conditional = "$conditional${and}!ObjectUtils.equals(this.${clo}, null)" ) + #set ( $conditional = "$conditional${and}!ObjectUtils.equals(this.${cdc}, +null)" ) #end - #set ( $arglist = "$arglist${comma}this.$clo" ) + #set ( $arglist = "$arglist${comma}this.$cdc" ) #set ( $and = " && " ) #set ( $comma = ", " ) #end @@ -1074,10 +1074,10 @@ #end #end - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) - #set ($argList = "${argList}$comma $cjtype $clo") - #set ($argList2 = "${argList2}$comma String $clo") + #set ($argList = "${argList}$comma $cjtype $cdc") + #set ($argList2 = "${argList2}$comma String $cdc") #set ( $comma = "," ) #end @@ -1085,17 +1085,17 @@ #if ($table.PrimaryKeys.size() == 1) #set ($col = $table.PrimaryKeys.get(0) ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) /** * Set the PrimaryKey using ObjectKey. * - * @param $clo ObjectKey + * @param $cdc ObjectKey */ - public void setPrimaryKey(ObjectKey $clo) + public void setPrimaryKey(ObjectKey $cdc) $throwsClause { - set${col.JavaName}(($cjtype)$clo); + set${col.JavaName}(($cjtype)$cdc); } /** @@ -1127,16 +1127,16 @@ * Set the PrimaryKey using SimpleKeys. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) - * @param $cjtype $clo + * @param $cjtype $cdc #end */ public void setPrimaryKey($argList) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}($col.Name.toLowerCase()); + set${col.JavaName}($col.JavaAttrName); #end } @@ -1144,15 +1144,15 @@ * Set the PrimaryKey with Strings. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) - * @param String $clo + #set ( $cdc=$col.JavaAttrName ) + * @param String $cdc #end */ public void setPrimaryKey($argList2) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}(new ${col.JavaNative}($col.Name.toLowerCase())); + set${col.JavaName}(new ${col.JavaNative}($col.JavaAttrName)); #end } @@ -1245,7 +1245,7 @@ protected $table.JavaName copyInto($table.JavaName copyObj) throws TorqueException { #foreach ($col in $table.Columns) - copyObj.set${col.JavaName}($col.Name.toLowerCase()); + copyObj.set${col.JavaName}($col.JavaAttrName); #end #if ($complexObjectModel)
Index: src/java/org/apache/torque/engine/database/model/Column.java =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java,v retrieving revision 1.22 diff -u -r1.22 Column.java --- src/java/org/apache/torque/engine/database/model/Column.java 8 May 2002 19:45:45 -0000 1.22 +++ src/java/org/apache/torque/engine/database/model/Column.java 2 Aug 2002 +14:30:02 -0000 @@ -54,6 +54,8 @@ * <http://www.apache.org/>. */ +import java.beans.Introspector; + import java.util.ArrayList; import java.util.Date; import java.util.Hashtable; @@ -78,6 +80,7 @@ private String name; private String description; private String javaName = null; + private String javaAttrName = null; private String javaNamingMethod; private boolean isNotNull = false; private String size; @@ -263,8 +266,8 @@ inputs.add(javaNamingMethod); try { - javaName = NameFactory.generateName(NameFactory.JAVA_GENERATOR, - inputs); + setJavaName(NameFactory.generateName(NameFactory.JAVA_GENERATOR, + inputs)); } catch (EngineException e) { @@ -281,6 +284,28 @@ { this.javaName = javaName; } + + /** + * Get attribute name corresponding to the current class name + * represented by JavaName - this supports usage as a bean + */ + public String getJavaAttrName() + { + if (javaAttrName == null) + { + +setJavaAttrName(Introspector.decapitalize(this.getJavaName())); + } + return javaAttrName; + } + + /** + * Set attribute name corresponding to the current class name + * represented by JavaName - this supports usage as a bean + */ + public void setJavaAttrName(String javaAttrName) + { + this.javaAttrName = javaAttrName; + } /** * Get type to use in Java sources Index: src/templates/om/ObjectWithManager.vm =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm,v retrieving revision 1.23 diff -u -r1.23 ObjectWithManager.vm --- src/templates/om/ObjectWithManager.vm 1 Aug 2002 16:51:38 -0000 1.23 +++ src/templates/om/ObjectWithManager.vm 2 Aug 2002 14:31:07 -0000 @@ -73,7 +73,7 @@ #if (!$table.isAlias()) #foreach ($col in $table.Columns) #set ( $cjtype = $col.JavaNative ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ($defVal = "") #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") ) #set ( $quote = '' ) @@ -105,14 +105,14 @@ #end /** - * The value for the $clo field + * The value for the $cdc field */ - private $cjtype $clo$defVal; + private $cjtype $cdc$defVal; #end #foreach ($col in $table.Columns) #set ( $cfc=$col.JavaName ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) /** @@ -121,7 +121,7 @@ */ public $cjtype get${cfc}() { - return $clo; + return $cdc; } #set ( $throwsClause = "" ) @@ -163,17 +163,17 @@ #if ( ($cjtype == "int") || ($cjtype == "long") || ($cjtype == "boolean") || ($cjtype == "short") || ($cjtype == "float") || ($cjtype == "double") || ($cjtype == "char") || ($cjtype == "byte") ) - if (this.$clo != v) + if (this.$cdc != v) { #else - if ( !ObjectUtils.equals(this.$clo, v) ) + if ( !ObjectUtils.equals(this.$cdc, v) ) { #end - this.$clo = v; + this.$cdc = v; setModified(true); } #else - this.$clo = v; + this.$cdc = v; #end #if ($complexObjectModel) @@ -299,7 +299,7 @@ #foreach ($columnName in $fk.LocalColumns) #set ( $column = $table.getColumn($columnName) ) #set ( $cjtype = $column.JavaNative ) - #set ( $clo=$column.Name.toLowerCase() ) + #set ( $cdc=$column.JavaAttrName ) #if ($cjtype == "short" || $cjtype == "int" || $cjtype == "long") #set ( $conditional = "$conditional${and}get${column.JavaName}()>0" ) #else @@ -1086,10 +1086,10 @@ #end #end - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) - #set ($argList = "${argList}$comma $cjtype $clo") - #set ($argList2 = "${argList2}$comma String $clo") + #set ($argList = "${argList}$comma $cjtype $cdc") + #set ($argList2 = "${argList2}$comma String $cdc") #set ( $comma = "," ) #end @@ -1097,16 +1097,16 @@ #if ($table.PrimaryKeys.size() == 1) #set ($col = $table.PrimaryKeys.get(0) ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) /** * Set the PrimaryKey using ObjectKey. * - * @param ObjectKey $clo + * @param ObjectKey $cdc */ - public void setPrimaryKey(ObjectKey $clo) + public void setPrimaryKey(ObjectKey $cdc) $throwsClause { - set${col.JavaName}(($cjtype)$clo); + set${col.JavaName}(($cjtype)$cdc); } /** @@ -1138,15 +1138,15 @@ * Set the PrimaryKey using SimpleKeys. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) - * @param $cjtype $clo + * @param $cjtype $cdc #end */ public void setPrimaryKey($argList) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}($col.Name.toLowerCase()); + set${col.JavaName}($col.JavaAttrName); #end } @@ -1154,14 +1154,14 @@ * Set the PrimaryKey with Strings. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) - * @param String $clo + #set ( $cdc=$col.JavaAttrName ) + * @param String $cdc #end */ public void setPrimaryKey($argList2) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}(new ${col.JavaNative}($col.Name.toLowerCase())); + set${col.JavaName}(new ${col.JavaNative}($col.JavaAttrName)); #end } @@ -1252,7 +1252,7 @@ $table.JavaName copyObj = new ${table.JavaName}(); #end #foreach ($col in $table.Columns) - copyObj.set${col.JavaName}($col.Name.toLowerCase()); + copyObj.set${col.JavaName}($col.JavaAttrName); #end #if ($complexObjectModel) Index: src/templates/om/Object.vm =================================================================== RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/om/Object.vm,v retrieving revision 1.45 diff -u -r1.45 Object.vm --- src/templates/om/Object.vm 1 Aug 2002 16:51:38 -0000 1.45 +++ src/templates/om/Object.vm 2 Aug 2002 14:31:07 -0000 @@ -73,7 +73,7 @@ #if (!$table.isAlias()) #foreach ($col in $table.Columns) #set ( $cjtype = $col.JavaNative ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ($defVal = "") #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") ) #set ( $quote = '' ) @@ -105,14 +105,14 @@ #end /** - * The value for the $clo field + * The value for the $cdc field */ - private $cjtype $clo$defVal; + private $cjtype $cdc$defVal; #end #foreach ($col in $table.Columns) #set ( $cfc=$col.JavaName ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) /** @@ -122,7 +122,7 @@ */ public $cjtype get${cfc}() { - return $clo; + return $cdc; } #set ( $throwsClause = "" ) @@ -166,17 +166,17 @@ #if ( ($cjtype == "int") || ($cjtype == "long") || ($cjtype == "boolean") || ($cjtype == "short") || ($cjtype == "float") || ($cjtype == "double") || ($cjtype == "char") || ($cjtype == "byte") ) - if (this.$clo != v) + if (this.$cdc != v) { #else - if (!ObjectUtils.equals(this.$clo, v)) + if (!ObjectUtils.equals(this.$cdc, v)) { #end - this.$clo = v; + this.$cdc = v; setModified(true); } #else - this.$clo = v; + this.$cdc = v; #end #if ($complexObjectModel) @@ -299,13 +299,13 @@ #foreach ($columnName in $fk.LocalColumns) #set ( $column = $table.getColumn($columnName) ) #set ( $cjtype = $column.JavaNative ) - #set ( $clo=$column.Name.toLowerCase() ) + #set ( $cdc=$column.JavaAttrName ) #if ($cjtype == "short" || $cjtype == "int" || $cjtype == "long") - #set ( $conditional = "$conditional${and}this.${clo}>0" ) + #set ( $conditional = "$conditional${and}this.${cdc}>0" ) #else - #set ( $conditional = "$conditional${and}!ObjectUtils.equals(this.${clo}, null)" ) + #set ( $conditional = "$conditional${and}!ObjectUtils.equals(this.${cdc}, +null)" ) #end - #set ( $arglist = "$arglist${comma}this.$clo" ) + #set ( $arglist = "$arglist${comma}this.$cdc" ) #set ( $and = " && " ) #set ( $comma = ", " ) #end @@ -1074,10 +1074,10 @@ #end #end - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype = $col.JavaNative ) - #set ($argList = "${argList}$comma $cjtype $clo") - #set ($argList2 = "${argList2}$comma String $clo") + #set ($argList = "${argList}$comma $cjtype $cdc") + #set ($argList2 = "${argList2}$comma String $cdc") #set ( $comma = "," ) #end @@ -1085,17 +1085,17 @@ #if ($table.PrimaryKeys.size() == 1) #set ($col = $table.PrimaryKeys.get(0) ) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) /** * Set the PrimaryKey using ObjectKey. * - * @param $clo ObjectKey + * @param $cdc ObjectKey */ - public void setPrimaryKey(ObjectKey $clo) + public void setPrimaryKey(ObjectKey $cdc) $throwsClause { - set${col.JavaName}(($cjtype)$clo); + set${col.JavaName}(($cjtype)$cdc); } /** @@ -1127,16 +1127,16 @@ * Set the PrimaryKey using SimpleKeys. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) + #set ( $cdc=$col.JavaAttrName ) #set ( $cjtype= $col.JavaNative ) - * @param $cjtype $clo + * @param $cjtype $cdc #end */ public void setPrimaryKey($argList) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}($col.Name.toLowerCase()); + set${col.JavaName}($col.JavaAttrName); #end } @@ -1144,15 +1144,15 @@ * Set the PrimaryKey with Strings. * #foreach ($col in $table.PrimaryKeys) - #set ( $clo=$col.Name.toLowerCase() ) - * @param String $clo + #set ( $cdc=$col.JavaAttrName ) + * @param String $cdc #end */ public void setPrimaryKey($argList2) $throwsClause { #foreach ($col in $table.PrimaryKeys) - set${col.JavaName}(new ${col.JavaNative}($col.Name.toLowerCase())); + set${col.JavaName}(new ${col.JavaNative}($col.JavaAttrName)); #end } @@ -1245,7 +1245,7 @@ protected $table.JavaName copyInto($table.JavaName copyObj) throws TorqueException { #foreach ($col in $table.Columns) - copyObj.set${col.JavaName}($col.Name.toLowerCase()); + copyObj.set${col.JavaName}($col.JavaAttrName); #end #if ($complexObjectModel)
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
