You can view the issue detail at the following URL:
<http://nagoya.apache.org/scarab/issues/id/TRQS15>
Type : Defect
Issue Id : TRQS15
Reported by: Rafal Maczewski
[EMAIL PROTECTED] - ([EMAIL PROTECTED])
Details:
Summary: Torque gererated code does not compile
Description: Code generated by Torque will not compile if the primary key column is
(VARCHAR) and managers are used. If managers are not used, the code compiles, but
generated code contains a bug. I created a table with just one column of type VARCHAR
(the schema is attached) and the results are as follows:<br>
When using managers, part of the code looks like this:
<pre>
/**
* Set the PrimaryKey using ObjectKey.
*
* @param ObjectKey test_key
*/
public void setPrimaryKey(ObjectKey test_key)
{
setTestKey(test_key); // <- this produces an error
// it should be test_key.toString()
}
/**
* Set the PrimaryKey using a String.
*/
public void setPrimaryKey(String key)
{
setTestKey(test_key); // <- this compiles, but is incorrect
// it should be setTestKey(key)
}
</pre>
Without managers only the setPrimaryKey(String) is incorrect:
<pre>
/**
* Set the PrimaryKey using a String.
*
* @param key
*/
public void setPrimaryKey(String key)
{
setTestKey(test_key); // the same as above
}
</pre>
I attach a patch to Object.vm and ObjectWithManager.vm that fixes the problem
Status: New
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>