Steve wrote:
> 
> Hi all:
> 
> I have a couple questions about Torque, specifically the schema.xml file.  I
> have an existing Oracle schema that I will be using for a new Turbine
> web-app.  There is a load of exisiting legacy code using the database, so
> making changes to the schema is problematic.
> 
> I am attempting to use the latest stable version of Torque (stand-alone or
> TDK) to
> generate my BaseObjects & Peers but am having quite a time with the
> exisiting schema.  I have a couple of questions that hopefully one or more
> of you can answer which will help me solve my problems.
> 
> 1) Since I have a pre-existing database, does adding <index> and <unique>
> tags generate anything special in the generated java base/peer code?  I
> don't care about the DDL generated, since I won't be using it.

they are not used in generating the java code.

> 
> 2) What does the <foreign key> tag buy me in the generated java code?  When
> I look at the classes that compile (not all do), it appears as if they add
> programmatic ref-int.  Is that basically right?  In a similar vein, if I
> already have ref-int with cascading updates/delete constraints in my
> database, do I need the foreign_key overhead in my code?

I would say the code added due to <foreign-key> tags is useful, but does
not necessarily guarantee referential integrity.  It mainly provides
convenient methods for selecting related records.  And also for grouping
a set of updates into a transaction.  I would say it is complimentary to
constraints specified in the schema.  If you do not want this code you
can set complexObjectModel=false in build.properties.

john mcnally

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to