Hello:
I am having problems with RC1, namely the
generated code doesn't compile.
When generating source code from a schema, two
seperate syntax errors appear with RC1.
First, the save() method signature of every
generated class contains the
declaration "throws $saveException" instead of
"throws Exception".
Second, the method populateObject(Record,int,ClassName
obj)
inside of BaseSomeTablePeer.java contains errors. The
following
line, setting the key is flagged as invalid:
obj.setSomeTableKey(row.getValue(offset +
0).asBigDecimal());
------RC1 (bad populateObject())--------
public static void populateObject(Record row,
int offset,
SomeTable obj)
throws TorqueException
{
try
{
obj.setSomeTableKey(row.getValue(offset +
0).asBigDecimal());
obj.setC1(row.getValue(offset +
1).asBigDecimal());
obj.setC2(row.getValue(offset +
2).asString());
}
catch (DataSetException e)
{
throw new TorqueException(e);
}
}
----------------------------------------
------B4 (good populateObject())--------
public static void populateObject(Record row,
int offset,
SomeTable obj)
throws TorqueException
{
try
{
if (row.getValue(offset +
0).asBigDecimal() instanceof Object)
{
if (null == row.getValue(offset +
0).asBigDecimal())
{
obj.setSomeTableKey((NumberKey)
null);
}
else
{
obj.setSomeTableKey(
new
NumberKey(row.getValue(offset + 0).asBigDecimal()));
}
}
obj.setC1(row.getValue(offset +
1).asBigDecimal());
obj.setC2(row.getValue(offset +
2).asString());
}
catch (DataSetException e)
{
throw new TorqueException(e);
}
}
----------------------------------------
Any feedback is appreciated. The database is Oracle.
-Greg
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
--
To unsubscribe, e-mail: <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>