Author: tfischer
Date: Thu Apr 12 01:46:46 2012
New Revision: 1325098
URL: http://svn.apache.org/viewvc?rev=1325098&view=rev
Log:
TORQUE-183 Test case for including other schema files
Added:
db/torque/torque4/trunk/torque-test/src/main/schema/included-from-included-schema.xml
db/torque/torque4/trunk/torque-test/src/main/schema/included-schema.xml
Modified:
db/torque/torque4/trunk/torque-test/ (props changed)
db/torque/torque4/trunk/torque-test/pom.xml
db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
Propchange: db/torque/torque4/trunk/torque-test/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Apr 12 01:46:46 2012
@@ -2,3 +2,4 @@
target
.settings
.classpath
+.checkstyle
Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=1325098&r1=1325097&r2=1325098&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Thu Apr 12 01:46:46 2012
@@ -155,6 +155,7 @@
<overrideConfigDir>src/main/torque-gen</overrideConfigDir>
<sourceExcludes>
<sourceExclude>ext*-schema.xml</sourceExclude>
+ <sourceExclude>included*-schema.xml</sourceExclude>
<sourceExclude>id-table-schema.xml</sourceExclude>
</sourceExcludes>
<optionsFile>torque-gen.properties</optionsFile>
@@ -182,7 +183,7 @@
<loglevel>info</loglevel>
<sourceExcludes>
<sourceExclude>ext*-schema.xml</sourceExclude>
- <sourceExclude>id-table-schema.xml</sourceExclude>
+ <sourceExclude>included*-schema.xml</sourceExclude>
</sourceExcludes>
<options>
<torque.database>${torque.targetDatabase}</torque.database>
@@ -204,6 +205,7 @@
<loglevel>info</loglevel>
<sourceExcludes>
<sourceExclude>ext*-schema.xml</sourceExclude>
+ <sourceExclude>included*-schema.xml</sourceExclude>
<sourceExclude>id-table-schema.xml</sourceExclude>
</sourceExcludes>
<options>
@@ -239,6 +241,11 @@
<packaging>classpath</packaging>
<configPackage>org.apache.torque.templates.doc.html</configPackage>
<sourceDir>target/torque/test/schema</sourceDir>
+ <sourceExcludes>
+ <sourceExclude>ext*-schema.xml</sourceExclude>
+ <sourceExclude>included*-schema.xml</sourceExclude>
+ <sourceExclude>id-table-schema.xml</sourceExclude>
+ </sourceExcludes>
<defaultOutputDir>target/generated-docs</defaultOutputDir>
<defaultOutputDirUsage>none</defaultOutputDirUsage>
<options>
@@ -277,6 +284,11 @@
<packaging>classpath</packaging>
<configPackage>org.apache.torque.templates.doc.xdoc</configPackage>
<sourceDir>target/torque/test/schema</sourceDir>
+ <sourceExcludes>
+ <sourceExclude>ext*-schema.xml</sourceExclude>
+ <sourceExclude>included*-schema.xml</sourceExclude>
+ <sourceExclude>id-table-schema.xml</sourceExclude>
+ </sourceExcludes>
<defaultOutputDir>target/generated-xdocs</defaultOutputDir>
<defaultOutputDirUsage>none</defaultOutputDirUsage>
<options>
Added:
db/torque/torque4/trunk/torque-test/src/main/schema/included-from-included-schema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/included-from-included-schema.xml?rev=1325098&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-test/src/main/schema/included-from-included-schema.xml
(added)
+++
db/torque/torque4/trunk/torque-test/src/main/schema/included-from-included-schema.xml
Thu Apr 12 01:46:46 2012
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<database name="@DATABASE_DEFAULT@"
+ defaultIdMethod="@DATABASE_ID_METHOD@"
+ package="org.apache.torque.test.ext"
+ xmlns="http://db.apache.org/torque/4.0/templates/database"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database
+ http://db.apache.org/torque/4.0/templates/database-strict.xsd">
+
+ <table name="included_from_included">
+ <column
+ name="id"
+ required="true"
+ primaryKey="true"
+ type="INTEGER"
+ />
+ <column
+ name="included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <column
+ name="reference_to_included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <foreign-key foreignTable="included">
+ <reference local="included_id" foreign="id"/>
+ </foreign-key>
+ <foreign-key foreignTable="reference_to_included">
+ <reference local="reference_to_included_id" foreign="id"/>
+ </foreign-key>
+ </table>
+</database>
Added: db/torque/torque4/trunk/torque-test/src/main/schema/included-schema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/included-schema.xml?rev=1325098&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/included-schema.xml
(added)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/included-schema.xml Thu
Apr 12 01:46:46 2012
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<database name="@DATABASE_DEFAULT@"
+ defaultIdMethod="@DATABASE_ID_METHOD@"
+ package="org.apache.torque.test.ext"
+ xmlns="http://db.apache.org/torque/4.0/templates/database"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database
+ http://db.apache.org/torque/4.0/templates/database-strict.xsd">
+
+ <include-schema filename="included-from-included-schema.xml" />
+
+ <table name="included">
+ <column
+ name="id"
+ required="true"
+ primaryKey="true"
+ type="INTEGER"
+ />
+ <column
+ name="included_from_included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <column
+ name="reference_to_included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <foreign-key foreignTable="included_from_included">
+ <reference local="included_from_included_id" foreign="id"/>
+ </foreign-key>
+ <foreign-key foreignTable="reference_to_included">
+ <reference local="reference_to_included_id" foreign="id"/>
+ </foreign-key>
+ </table>
+</database>
Modified: db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml?rev=1325098&r1=1325097&r2=1325098&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
(original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml Thu Apr
12 01:46:46 2012
@@ -27,6 +27,7 @@
xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database
http://db.apache.org/torque/4.0/templates/database.xsd">
+ <include-schema filename="included-schema.xml" />
<external-schema filename="ext-schema.xml" />
<!-- TRQS77 -->
@@ -45,6 +46,32 @@
</foreign-key>
</table>
+ <!-- reference to included schema -->
+ <table name="reference_to_included">
+ <column
+ name="id"
+ required="true"
+ primaryKey="true"
+ type="INTEGER"
+ />
+ <column
+ name="included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <column
+ name="included_from_included_id"
+ required="false"
+ type="INTEGER"
+ />
+ <foreign-key foreignTable="included">
+ <reference local="included_id" foreign="id"/>
+ </foreign-key>
+ <foreign-key foreignTable="included_from_included">
+ <reference local="included_from_included_id" foreign="id"/>
+ </foreign-key>
+ </table>
+
<!-- reference to external schema -->
<table name="ext_schema">
<column name="ext_schema_id" required="true" primaryKey="true"
type="INTEGER"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]