You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Phee, Martin J (Jump Tech)" <Ma...@bp.com> on 2002/02/26 14:57:23 UTC

Problem with Torque generating classes

I'm using the nightly build of torque from a few days ago.  I dumped my db
layout using JDBCToXML task, which worked well.  I had to clean up the XML a
little, which is no big deal.  The problem is with foreign keys.  Below is
an example of some of the foreign keys in our db.  What's happening is that
my OM classes have duplicate functions and varibles because of the two
columns in the foreign-key.  I had to go through the XML schema, and remove
all of these.  

Another thing is default values.  Many tables have user/sysdate for the
default values on the update_date, update_user fields.  Java doesn't know
anything about user or sysdate.  I just ended up removing all those defaults
since the database takes care of them.  Not sure if there's anything that
can really be done about that, or should be done.

One other thing non-torque related I believe.  How many file handles can a
process have under w2k?  Torque would die at the same point all the time
until I removed some of the tables from the XML file.  The original file had
412 table/views/synonyms.  After I removed a few (can't remember how many)
it would work.  The final XML file has 254 tables.

DB: Oracle 8.1.7

<table name="tbl1">
	<column name="col1" primaryKey="true"/>
	<column name="pl_sys_id"/>
	<column name="grade"/>
	
	<foreign-key foreignTable="pl_sys_grades">
		<reference foreign="pl_sys_id" local="pl_sys_id"/>
		<reference foreign="grade" local="grade"/>
	</foreign-key>
</table>

<table name="pl_sys_grades">
	<column name="pl_sys_id" primaryKey="true"/>
	<column name="grade" primaryKey="true"/>
	<column name="desc"/>
</table>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>