You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Shaun Campbell <Sh...@entranet.co.uk> on 2001/06/08 22:50:44 UTC

Torque problem

I have an existing app that I am trying to update from tdk1a13 to tdk2.1b4.
The app used to work using tdk1a13, but under tdk2.1b4 I don't seem to be
getting a value from one column on a particular table.

I have followed the code through until I come to a populateObject method in
my BaseGencalitemPeer.java class.

The following 3 lines of debug

		System.out.println("row value is " +
row.getValue(offset+1));
		NumberKey nk = new
NumberKey(row.getValue(offset+1).asBigDecimal());
		System.out.println("numberKey is " + nk.getValue());

generate the following output:

		row value is 7
		numberKey is null

So I am retrieving the value from the database but a number key is not
generated properly.

My schema for this table is:

<table name="genCalItem">
    <column name="calname" primaryKey="true" required="true"
type="VARCHAR"></column>
    <column name="day" primaryKey="true" required="true"
type="INTEGER"></column>
    <column name="starthour" required="true" type="INTEGER"
default="0"></column>
    <column name="startminute" required="true" type="INTEGER"
default="0"></column>
    <column name="endhour" required="true" type="INTEGER"
default="0"></column>
    <column name="endminute" required="true" type="INTEGER"
default="0"></column>
</table>

As far as I can see the column is defined as an Integer but the NumberKey
treats it as a bigDecimal. Apart from that the only thing that I can see is
that there are two primary key fields defined on the first and second
columns (a composite key).

Can anyone suggest why the NumberKey is getting set to null and hence is
losing me my values in this field?

Regards

Shaun Campbell

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org