Hi,
it looks like the onDelete attribute of the foreign-key element isn't being
used for generating the sql code. Is there a reason for this? I don't know
if this attribute is going to be removed in the future or not, but I've
included a patch (see attachment) to use this attribute for the
sql-generation (Oracle database, but other databases can be changed similar
I guess?).
Maarten
--
Maarten Coene
Katholieke Universiteit Leuven
Dept. Computerwetenschappen Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee
cvs diff -u foreignkey.vm
Index: foreignkey.vm
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-torque/src/templates/sql/base/oracle/foreignkey.vm,v
retrieving revision 1.2
diff -u -r1.2 foreignkey.vm
--- foreignkey.vm 22 Aug 2001 20:14:15 -0000 1.2
+++ foreignkey.vm 26 Jun 2002 15:39:26 -0000
@@ -2,6 +2,9 @@
ALTER TABLE $table.Name
ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames)
REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames)
+ #if ($fk.hasOnDelete())
+ ON DELETE $fk.OnDelete
+ #end
;
#end
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>