http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml deleted file mode 100644 index 2b5f07b..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map> - - <dbimport> - <tableType>type1</tableType> - <tableType>type2</tableType> - <tableType>type3</tableType> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project>
http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml deleted file mode 100644 index 98dc674..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml</map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - <dbimport> - <schema>SCHEMA_01</schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml deleted file mode 100644 index 20ccc69..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultSchema" value="SCHEMA_01"/> - - - <db-entity name="ADDRESS" schema="SCHEMA_01"> - <db-attribute name="addressString" type="VARCHAR" length="250"/> - <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/> - </db-entity> - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="date" type="TIME"/> - <db-attribute name="id" type="INTEGER" length="10"/> - <db-attribute name="name" type="VARCHAR" length="30"/> - <db-attribute name="parent_id" type="INTEGER" length="10"/> - </db-entity> - <db-entity name="PARENT" schema="SCHEMA_01"> - <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - - - <obj-entity name="Address" className="Address" dbEntityName="ADDRESS"> - <obj-attribute name="addrStr" type="java.lang.String" db-attribute-path="addressString"/> - </obj-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - <obj-attribute name="id" type="java.lang.Integer" db-attribute-path="id"/> - <obj-attribute name="name" type="java.lang.String"/> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="PARENT"> - </obj-entity> - - - <db-relationship name="parent" source="CHILD" target="PARENT" toMany="false"> - <db-attribute-pair source="parent_id" target="id"/> - </db-relationship> - <db-relationship name="children" source="PARENT" target="CHILD" toMany="true"> - <db-attribute-pair source="id" target="parent_id"/> - </db-relationship> - - - <obj-relationship name="parent" source="Child" target="Parent" deleteRule="Nullify" db-relationship-path="parent"/> - <obj-relationship name="children" source="Parent" target="Child" deleteRule="Deny" db-relationship-path="children"/> -</data-map> - http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml-result deleted file mode 100644 index d68faf1..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml-result +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultSchema" value="SCHEMA_01"/> - - <db-entity name="ADDRESS" schema="SCHEMA_01"> - <db-attribute name="ADDRSTR" type="VARCHAR" length="250"/> - <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/> - </db-entity> - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="ADDRESS_ID" type="INTEGER" length="10"/> - <db-attribute name="date" type="DATE" length="10" /> - <db-attribute name="id" type="INTEGER" length="10"/> - <db-attribute name="name" type="VARCHAR" isMandatory="true" length="30" /> - <db-attribute name="parent_id" type="INTEGER" length="10"/> - </db-entity> - <obj-entity name="Address" className="Address" dbEntityName="ADDRESS"> - <obj-attribute name="addrstr" type="java.lang.String" db-attribute-path="ADDRSTR"/> - </obj-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - <obj-attribute name="id" type="java.lang.Integer" db-attribute-path="id"/> - <obj-attribute name="name" type="java.lang.String"/> - </obj-entity> - <db-relationship name="children" source="ADDRESS" target="CHILD" toMany="true"> - <db-attribute-pair source="id" target="ADDRESS_ID"/> - </db-relationship> - <db-relationship name="address" source="CHILD" target="ADDRESS" toMany="false"> - <db-attribute-pair source="ADDRESS_ID" target="id"/> - </db-relationship> - <obj-relationship name="children" source="Address" target="Child" deleteRule="Deny" db-relationship-path="children"/> - <obj-relationship name="address" source="Child" target="Address" deleteRule="Nullify" db-relationship-path="address"/> - -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.sql deleted file mode 100644 index 9885bc7..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.sql +++ /dev/null @@ -1,34 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.address ( - addrStr VARCHAR (250), - id INTEGER NOT NULL, - PRIMARY KEY (id) -); - -CREATE TABLE schema_01.child ( - address_id INTEGER , - "date" DATE, - id INTEGER , - name VARCHAR(30) NOT NULL, - parent_id INTEGER , - CONSTRAINT fk_address FOREIGN KEY (address_id) REFERENCES schema_01.address (id) -); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml deleted file mode 100644 index 8ba74e2..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map> - target/test-classes/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml - </map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - <dbimport> - <meaningfulPkTables>^*$</meaningfulPkTables> - <usePrimitives>true</usePrimitives> - <stripFromTableNames>^xyz_</stripFromTableNames> - <schema> - <name>SCHEMA_01</name> - </schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml deleted file mode 100644 index acbc62c..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultSchema" value="SCHEMA_01"/> - <db-entity name="EXISTING_TABLE" schema="SCHEMA_01"> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="ExistingTable" className="ExistingTable" dbEntityName="EXISTING_TABLE"> - </obj-entity> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result deleted file mode 100644 index 9f36c0f..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml-result +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultSchema" value="SCHEMA_01"/> - <db-entity name="EXISTING_TABLE" schema="SCHEMA_01"> - <db-attribute name="COL2" type="INTEGER" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <db-entity name="NEW_TABLE" schema="SCHEMA_01"> - <db-attribute name="COL2" type="INTEGER" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <db-entity name="XYZ_PREFIXED_NEW_TABLE" schema="SCHEMA_01"> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="ExistingTable" className="ExistingTable" dbEntityName="EXISTING_TABLE"> - <obj-attribute name="col2" type="int" db-attribute-path="COL2"/> - </obj-entity> - <obj-entity name="NewTable" className="NewTable" dbEntityName="NEW_TABLE"> - <obj-attribute name="col2" type="int" db-attribute-path="COL2"/> - <obj-attribute name="id" type="int" db-attribute-path="ID"/> - </obj-entity> - <obj-entity name="PrefixedNewTable" className="PrefixedNewTable" dbEntityName="XYZ_PREFIXED_NEW_TABLE"> - <obj-attribute name="id" type="int" db-attribute-path="ID"/> - </obj-entity> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql deleted file mode 100644 index fe9ccd5..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.sql +++ /dev/null @@ -1,36 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.new_table ( - id INTEGER NOT NULL, - COL2 INTEGER, - PRIMARY KEY (id) - ); - -CREATE TABLE schema_01.existing_table ( - id INTEGER NOT NULL, - COL2 INTEGER, - PRIMARY KEY (id) - ); - -CREATE TABLE schema_01.xyz_prefixed_new_table ( - id INTEGER NOT NULL, - PRIMARY KEY (id) - ); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml deleted file mode 100644 index 0fcafcb..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml</map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - - <dbimport> - <schema> - <name>SCHEMA_01</name> - </schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml deleted file mode 100644 index 759090a..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - - <db-entity name="parent" schema="SCHEMA_01"> - <db-attribute name="COL2" type="CHAR" length="25"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="col1" type="INTEGER"/> - <db-attribute name="col2" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="parent_id" type="CHAR" length="25"/> - </db-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - <obj-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="parent"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> - - <db-relationship name="parent" source="CHILD" target="parent" toMany="false"> - <db-attribute-pair source="parent_id" target="ID"/> - </db-relationship> - <db-relationship name="children" source="parent" target="CHILD" toMany="true"> - <db-attribute-pair source="ID" target="parent_id"/> - </db-relationship> - - <obj-relationship name="parent" source="Child" target="Parent" deleteRule="Nullify" db-relationship-path="parent"/> - <obj-relationship name="children" source="Parent" target="Child" deleteRule="Deny" db-relationship-path="children"/> -</data-map> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml-result deleted file mode 100644 index c53bde2..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml-result +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="COL3" type="DECIMAL" length="5" scale="1"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="col1" type="DOUBLE" length="52"/> - <db-attribute name="col2" type="CHAR" length="25"/> - <db-attribute name="parent_id" type="INTEGER" length="10"/> - </db-entity> - <db-entity name="parent" schema="SCHEMA_01"> - <db-attribute name="COL2" type="CHAR" length="20"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="50"/> - <db-attribute name="COL5" type="TIME" length="8"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - <obj-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="parent"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> - <db-relationship name="parent" source="CHILD" target="parent" toMany="false"> - <db-attribute-pair source="parent_id" target="ID"/> - </db-relationship> - <db-relationship name="children" source="parent" target="CHILD" toMany="true"> - <db-attribute-pair source="ID" target="parent_id"/> - </db-relationship> - <obj-relationship name="parent" source="Child" target="Parent" deleteRule="Nullify" db-relationship-path="parent"/> - <obj-relationship name="children" source="Parent" target="Child" deleteRule="Deny" db-relationship-path="children"/> -</data-map> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.sql deleted file mode 100644 index c93c802..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange.sql +++ /dev/null @@ -1,46 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.parent ( - id INTEGER NOT NULL, - COL2 CHAR(20), - COL3 DECIMAL(10,2), - COL4 VARCHAR(50), - COL5 TIME, - - PRIMARY KEY (id), - UNIQUE (COL3) -); - -CREATE TABLE schema_01.child ( - id INTEGER NOT NULL, - parent_id INTEGER, - COL1 FLOAT, - COL2 CHAR(25), - COL3 DECIMAL(5,1), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id) -); - -ALTER TABLE schema_01.child - ADD FOREIGN KEY (parent_id) - REFERENCES schema_01.parent (id); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml deleted file mode 100644 index c62c68f..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml</map> - - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - - <dbimport> - <defaultPackage>com.example.test</defaultPackage> - <schema>SCHEMA_01</schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml-result deleted file mode 100644 index 5373617..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml-result +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultPackage" value="com.example.test"/> - <property name="defaultSchema" value="SCHEMA_01"/> - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="PARENT_ID" type="CHAR" length="25"/> - </db-entity> - <db-entity name="PARENT" schema="SCHEMA_01"> - <db-attribute name="COL2" type="CHAR" length="25"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="com.example.test.Child" dbEntityName="CHILD"> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - <obj-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/> - </obj-entity> - <obj-entity name="Parent" className="com.example.test.Parent" dbEntityName="PARENT"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.sql deleted file mode 100644 index 279065c..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage.sql +++ /dev/null @@ -1,40 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.Parent ( - id INTEGER NOT NULL, - COL2 CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id), - UNIQUE (COL3) -); - -CREATE TABLE schema_01.Child ( - id INTEGER NOT NULL, - Parent_id CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id) -); http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml deleted file mode 100644 index f7d6adb..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml</map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - - <dbimport> - <schema>SCHEMA_01</schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result deleted file mode 100644 index a65e271..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultSchema" value="SCHEMA_01"/> - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="PARENT_ID" type="CHAR" length="25"/> - </db-entity> - <db-entity name="PARENT" schema="SCHEMA_01"> - <db-attribute name="COL2" type="CHAR" length="25"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - <obj-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="PARENT"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql deleted file mode 100644 index dba8da6..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql +++ /dev/null @@ -1,64 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.Parent ( - id INTEGER NOT NULL, - COL2 CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id), - UNIQUE (COL3) -); - -CREATE TABLE schema_01.Child ( - id INTEGER NOT NULL, - Parent_id CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id) -); - -CREATE SCHEMA schema_02; -SET SCHEMA schema_02; - -CREATE TABLE schema_02.Parent ( - id INTEGER NOT NULL, - COL2 CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id), - UNIQUE (COL3) -); - -CREATE TABLE schema_02.Child ( - id INTEGER NOT NULL, - Parent_id CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id) -); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml deleted file mode 100644 index 7b454d8..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml</map> - - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - - <dbimport> - <schema> - <name>SCHEMA_01</name> - </schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml deleted file mode 100644 index 948e121..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="id" type="INTEGER" length="10"/> - <db-attribute name="parent_id" type="INTEGER" length="10"/> - </db-entity> - <db-entity name="PARENT" schema="SCHEMA_01"> - <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="PARENT"> - </obj-entity> - <db-relationship name="parent" source="CHILD" target="PARENT" toMany="false"> - <db-attribute-pair source="parent_id" target="id"/> - </db-relationship> - <db-relationship name="children" source="PARENT" target="CHILD" toMany="true"> - <db-attribute-pair source="id" target="parent_id"/> - </db-relationship> - <obj-relationship name="parent" source="Child" target="Parent" deleteRule="Nullify" db-relationship-path="parent"/> - <obj-relationship name="children" source="Parent" target="Child" deleteRule="Deny" db-relationship-path="children"/> -</data-map> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml-result deleted file mode 100644 index d10b90d..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml-result +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ 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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - - <db-entity name="CHILD" schema="SCHEMA_01"> - <db-attribute name="PAR" type="INTEGER" length="10"/> - <db-attribute name="id" type="INTEGER" length="10"/> - </db-entity> - <db-entity name="PARENT" schema="SCHEMA_01"> - <db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="Child" dbEntityName="CHILD"> - </obj-entity> - <obj-entity name="Parent" className="Parent" dbEntityName="PARENT"> - </obj-entity> - <db-relationship name="parent" source="CHILD" target="PARENT" toMany="false"> - <db-attribute-pair source="PAR" target="id"/> - </db-relationship> - <db-relationship name="children" source="PARENT" target="CHILD" toMany="true"> - <db-attribute-pair source="id" target="PAR"/> - </db-relationship> - <obj-relationship name="parent" source="Child" target="Parent" deleteRule="Nullify" db-relationship-path="parent"/> - <obj-relationship name="children" source="Parent" target="Child" deleteRule="Deny" db-relationship-path="children"/> -</data-map> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.sql deleted file mode 100644 index 07a65a9..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename.sql +++ /dev/null @@ -1,33 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.parent ( - id INTEGER NOT NULL, - PRIMARY KEY (id) -); - -CREATE TABLE schema_01.child ( - id INTEGER, - par INTEGER -); - -ALTER TABLE schema_01.child - ADD FOREIGN KEY (par) - REFERENCES schema_01.parent (id); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml deleted file mode 100644 index f4ec9c7..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml</map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - <dbimport> - <defaultPackage>org.not.my.home</defaultPackage> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml-result deleted file mode 100644 index 8263273..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml-result +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultPackage" value="org.not.my.home"/> - <db-entity name="A" schema="APP"> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <db-entity name="A_A" schema="APP"> - <db-attribute name="A1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="A2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="A" className="org.not.my.home.A" dbEntityName="A"> - </obj-entity> - <db-relationship name="aAArray" source="A" target="A_A" toDependentPK="true" toMany="true"> - <db-attribute-pair source="ID" target="A1_ID"/> - </db-relationship> - <db-relationship name="aAArray1" source="A" target="A_A" toDependentPK="true" toMany="true"> - <db-attribute-pair source="ID" target="A2_ID"/> - </db-relationship> - <db-relationship name="toA" source="A_A" target="A" toMany="false"> - <db-attribute-pair source="A1_ID" target="ID"/> - </db-relationship> - <db-relationship name="toA1" source="A_A" target="A" toMany="false"> - <db-attribute-pair source="A2_ID" target="ID"/> - </db-relationship> - <obj-relationship name="aArray" source="A" target="A" db-relationship-path="aAArray.toA1"/> - <obj-relationship name="aArray1" source="A" target="A" db-relationship-path="aAArray1.toA"/> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.sql deleted file mode 100644 index 9df54ab..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.sql +++ /dev/null @@ -1,31 +0,0 @@ --- 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. - -CREATE TABLE APP.A ( - id INTEGER NOT NULL, - - PRIMARY KEY (id) -); - -CREATE TABLE APP.A_A ( - A1_ID INTEGER NOT NULL, - A2_ID INTEGER NOT NULL, - - PRIMARY KEY (A1_ID, A2_ID), - CONSTRAINT A_A1 FOREIGN KEY (A1_ID) REFERENCES APP.A (ID), - CONSTRAINT A_A2 FOREIGN KEY (A2_ID) REFERENCES APP.A (ID) -); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml deleted file mode 100644 index 81e54cc..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml</map> - - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - - <dbimport> - <defaultPackage>com.example.test</defaultPackage> - <forceDataMapCatalog>true</forceDataMapCatalog> - <forceDataMapSchema>true</forceDataMapSchema> - - <schema>SCHEMA_01</schema> - </dbimport> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml deleted file mode 100644 index 1d9dea0..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultPackage" value="com.example.test"/> - <property name="defaultCatalog" value="XCATALOG"/> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml-result ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml-result b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml-result deleted file mode 100644 index 0eaaffd..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml-result +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <property name="defaultPackage" value="com.example.test"/> - <property name="defaultCatalog" value="XCATALOG"/> - <db-entity name="CHILD" catalog="XCATALOG"> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="PARENT_ID" type="CHAR" length="25"/> - </db-entity> - <db-entity name="PARENT" catalog="XCATALOG"> - <db-attribute name="COL2" type="CHAR" length="25"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - </db-entity> - <obj-entity name="Child" className="com.example.test.Child" dbEntityName="CHILD"> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - <obj-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/> - </obj-entity> - <obj-entity name="Parent" className="com.example.test.Parent" dbEntityName="PARENT"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> -</data-map> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.sql ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.sql b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.sql deleted file mode 100644 index 279065c..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.sql +++ /dev/null @@ -1,40 +0,0 @@ --- 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. - -CREATE SCHEMA schema_01; -SET SCHEMA schema_01; - -CREATE TABLE schema_01.Parent ( - id INTEGER NOT NULL, - COL2 CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id), - UNIQUE (COL3) -); - -CREATE TABLE schema_01.Child ( - id INTEGER NOT NULL, - Parent_id CHAR(25), - COL3 DECIMAL(10,2), - COL4 VARCHAR(25), - COL5 DATE, - - PRIMARY KEY (id) -); http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml deleted file mode 100644 index 01f76e0..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <name>DbImporterMojo Test1</name> - - <build> - <plugins> - <plugin> - <artifactId>cayenne-maven-plugin</artifactId> - <configuration> - <map>target/test-classes/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml</map> - <dataSource> - <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> - <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url> - </dataSource> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cayenne/blob/a0cd93d6/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml ---------------------------------------------------------------------- diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml deleted file mode 100644 index 2317476..0000000 --- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> -<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd" - project-version="9"> - <db-entity name="testImportAddTableAndColumn" schema="APP"> - <db-attribute name="COL1" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/> - <db-attribute name="COL2" type="CHAR" length="25"/> - <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/> - <db-attribute name="COL4" type="VARCHAR" length="25"/> - <db-attribute name="COL5" type="DATE" length="10"/> - </db-entity> - <obj-entity name="testImportAddTableAndColumn" className="TestTable" dbEntityName="testImportAddTableAndColumn"> - <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/> - <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/> - <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/> - <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/> - </obj-entity> -</data-map>