On Friday, June 15, 2001, at 08:28 AM, Shaun Campbell wrote:
> It seems that if my column has two fields identified as the key, the
> second
> one, if defined as an Integer, tries to create a NumberKey by getting
> the
> value from the record as a bigDecimal, resulting in a null NumberKey
> object.
>
>
> If the table has just one key field, which is defined as an Integer,
> then
> the application gets the value from the database okay.
>
> I can't seem to find whereabouts in the code this mapping takes
> place. I
> don't suppose you can shed any light on this?
Shaun,
Your problem has just stepped outside of what I know about Turbine.
Specifically, I have not used multiple column primary keys, nor have
I spent any time looking at torque's java classes that drive the
generation of the code. What I can tell you is this:
using this unix command...
find src/java/org/apache/turbine/torque -type f -exec grep -i
primarykey {} \;
I can see that these files would be reasonable places to look:
engine/database/model/Column.java
engine/database/model/Table.java
engine/database/transform/SQLToAppData.java
I think that those classes (and others like them) are used in conjunction
with the Velocity template files in the conf/torque/templates/ directory
to construct the objects from the foo-schema.xml file. Another good
place to look would be here:
conf/torque/templates/om/Object.vm and its neighbors.
If I am pointing you in the wrong direction, I suspect that Jason will
correct me. 8^)
-Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]