Author: tfischer
Date: Fri Sep 10 04:11:58 2010
New Revision: 995662
URL: http://svn.apache.org/viewvc?rev=995662&view=rev
Log:
TORQUE-131: Remove support for value 'none' of the onUpdate and onDelete
attributes of the foreign-key element in the schema XML.
Modified:
db/torque/torque4/trunk/torque-site/src/changes/changes.xml
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
Modified: db/torque/torque4/trunk/torque-site/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/changes/changes.xml?rev=995662&r1=995661&r2=995662&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/changes/changes.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/changes/changes.xml Fri Sep 10
04:11:58 2010
@@ -24,6 +24,12 @@
<body>
<release version="4.0-alpha1-SNAPSHOT" date="in SVN">
+ <action type="remove" dev="tfischer" issue="TORQUE-131">
+ Remove support for value 'none' of the onUpdate and onDelete attributes
+ of the foreign-key element in the schema XML.
+ Users who have used this value in old schema XMLs, simply remove
+ the attribute.
+ </action>
<action type="remove" dev="gmonroe" issue="TORQUE-130">
Remove the heavyIndexing attribute for the elements table and database
in schema XML files.
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java?rev=995662&r1=995661&r2=995662&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
Fri Sep 10 04:11:58 2010
@@ -350,25 +350,6 @@ public class SQLTransformer implements S
int fkIndex)
throws SourceTransformerException
{
- // TODO: the 3.3 schema specifies "none" as default value
- // for the attributes onUpdate and onDelete.
- // This is equivalent to null. This code can be removed
- // once the schema/dtd is updated
- if ("none".equals(foreignKeyElement.getAttribute(
- TorqueSchemaAttributeName.ON_UPDATE.getName())))
- {
- foreignKeyElement.setAttribute(
- TorqueSchemaAttributeName.ON_UPDATE.getName(),
- null);
- }
- if ("none".equals(foreignKeyElement.getAttribute(
- TorqueSchemaAttributeName.ON_DELETE.getName())))
- {
- foreignKeyElement.setAttribute(
- TorqueSchemaAttributeName.ON_DELETE.getName(),
- null);
- }
-
if (foreignKeyElement.getAttribute(
TorqueSchemaAttributeName.NAME.getName())
== null)
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd?rev=995662&r1=995661&r2=995662&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
Fri Sep 10 04:11:58 2010
@@ -654,8 +654,7 @@ The name of the table that contains the
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="onDelete" use="optional" type="cascadeType"
- default="none" >
+ <xs:attribute name="onDelete" use="optional" type="cascadeType">
<xs:annotation>
<xs:documentation xml:lang="en">
The action to take when the referenced value in foreignTable is deleted.
@@ -664,8 +663,7 @@ work if the DB server does not support t
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="onUpdate" use="optional" type="cascadeType"
- default="none" >
+ <xs:attribute name="onUpdate" use="optional" type="cascadeType">
<xs:annotation>
<xs:documentation xml:lang="en">
The action to take when the referenced value in foreignTable is updated.
@@ -906,7 +904,6 @@ null = Use the value previously se
<xs:enumeration value="cascade" />
<xs:enumeration value="setnull" />
<xs:enumeration value="restrict" />
- <xs:enumeration value="none" />
</xs:restriction>
</xs:simpleType>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]