Hello,

I've extracted project-schema.xml file from an existing database using the
ANT JDBC task, added the name attribute to the database element and used it
to generate my peer classes.

I'm observing a number of generated classes that will not compile, and one
issue has repeated itself: If I have a table with a foreign key element in
the schema.xml in the generated Base* table I get duplicate get methods.
One, referring to the foreign key Object, and one to a field mapping to the
foreign-key column in my table.

Example:
                Table                   Table
                Foo     1 ---> N        Bar

In BaseBar I would have two methods:
                String getFoo() --      Foreign Key value in the column of table Bar
                Foo      getFoo()       --      Torque generated Foo object 
representing Foreign Key

The work around is this:
In the project-schema.xml under the Bar table element where Foo column is
defined
(Foreign Key column) is to add the javaName="FooName" attribute.

My question, Is this the way foreign-keys must be handled? It appears Torque
can not tell the difference between retrieving foreign-key field and object.
Or (more likely) do I have something misconfigured?

I would like not to have to touch every foreign key because I will be using
the JDBC task to keep up with the ever growing database design.

Thanks

Steve Hansen
Solutions Engineer
[EMAIL PROTECTED]
Sinex Aviation Technologies


--
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>

Reply via email to