cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amania...@apache.org
Subject svn commit: r773771 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/map/ test/java/org/apache/cayenne/map/ test/resources/
Date Tue, 12 May 2009 03:08:22 GMT
Author: amaniatis
Date: Tue May 12 03:08:21 2009
New Revision: 773771

URL: http://svn.apache.org/viewvc?rev=773771&view=rev
Log:
CAY-1167
The schema is now enforced by Cayenne. That is, invalid XML will be rejected. This has some
benefits:

* it will force us to keep the schema updated and in sync with changes to the code. That is,
it will serve as real documenation for the XML.
* it will reject corrupted XML which might cause odd problems at runtime

However in the short term we need to ensure everyone's maps validate properly. Everything
in the Cayenne junit test suite validates as does every map I could find.
Updating the schema is easy and it is automatically published to the web site each night.


Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap-dependent.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
Tue May 12 03:08:21 2009
@@ -102,6 +102,11 @@
     
     public static final String DEFAULT_QUOTE_SQL_IDENTIFIERS_PROPERTY = "quoteSqlIdentifiers";
 
+    /**
+     * The namespace in which the data map XML file will be created. This is also the URI
to locate a copy of the schema document.
+     */
+    public static final String SCHEMA_XSD = "http://cayenne.apache.org/schema/3.0/modelMap";
+    
     protected String name;
     protected String location;
     protected MappingNamespace namespace;
@@ -259,9 +264,10 @@
      * @since 1.1
      */
     public void encodeAsXML(XMLEncoder encoder) {
-        encoder.print("<data-map project-version=\"");
-        encoder.print(String.valueOf(Project.CURRENT_PROJECT_VERSION));        
-        encoder.println("\">");
+        encoder.println("<data-map xmlns=\"http://cayenne.apache.org/schema/3.0/modelMap\"");
+        encoder.println("  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
+        encoder.println("  xsi:schemaLocation=\"" + SCHEMA_XSD + " " + SCHEMA_XSD + "\"");
+        encoder.println("  project-version=\"" + Project.CURRENT_PROJECT_VERSION + "\">");
 
         encoder.indent(1);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
Tue May 12 03:08:21 2009
@@ -19,8 +19,11 @@
 
 package org.apache.cayenne.map;
 
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
@@ -35,6 +38,7 @@
 import org.apache.cayenne.remote.hessian.service.HessianUtil;
 import org.apache.cayenne.util.Util;
 import org.apache.cayenne.util.XMLEncoder;
+import org.xml.sax.InputSource;
 
 /**
  * DataMap unit tests.
@@ -404,33 +408,39 @@
     }
 
 
-    public void testQuoteSqlIdentifiersEcodeAsXML(){
+    public void testQuoteSqlIdentifiersEncodeAsXML(){
         DataMap map = new DataMap("aaa");
         map.setQuotingSQLIdentifiers(true);
         StringWriter w = new StringWriter();
-        XMLEncoder e = new XMLEncoder(new PrintWriter(w));
-
-        String separator = System.getProperty("line.separator");
-
-        StringBuffer s = new StringBuffer("<data-map project-version=\"");
-        s.append(String.valueOf(Project.CURRENT_PROJECT_VERSION));
-        s.append("\">").append(separator);
-        s.append("<property name=\"quoteSqlIdentifiers\" value=\"true\"/>").append(separator);
-        s.append("</data-map>").append(separator);
-
-        map.encodeAsXML(e);
-        assertEquals(w.getBuffer().toString(), s.toString());
+        XMLEncoder encoder = new XMLEncoder(new PrintWriter(w));
+        map.encodeAsXML(encoder);
+        
+        assertTrue(map.quotingSQLIdentifiers);
+        
+        MapLoader loader = new MapLoader();
+        try {
+            InputStream is = new ByteArrayInputStream(w.getBuffer().toString().getBytes("UTF-8"));
+            DataMap newMap = loader.loadDataMap(new InputSource(is));
+            assertTrue(newMap.quotingSQLIdentifiers);
+            
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
 
         map.setQuotingSQLIdentifiers(false);
         StringWriter w2 = new StringWriter();
-        XMLEncoder e2 = new XMLEncoder(new PrintWriter(w2));
-
-        StringBuffer s2 = new StringBuffer("<data-map project-version=\"");
-        s2.append(String.valueOf(Project.CURRENT_PROJECT_VERSION));
-        s2.append("\">").append(separator);
-        s2.append("</data-map>").append(separator);
-        map.encodeAsXML(e2);
-        assertEquals(w2.getBuffer().toString(), s2.toString());
+        XMLEncoder encoder2 = new XMLEncoder(new PrintWriter(w2));
+        map.encodeAsXML(encoder2);
+        
+        assertFalse(map.quotingSQLIdentifiers);
+        try {
+            InputStream is = new ByteArrayInputStream(w2.getBuffer().toString().getBytes("UTF-8"));
+            DataMap newMap = loader.loadDataMap(new InputSource(is));
+            assertFalse(newMap.quotingSQLIdentifiers);
+            
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
 
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+ xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+ project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.embeddable"/>
 	<embeddable className="org.apache.cayenne.testdo.embeddable.Embeddable1">
 		<embeddable-attribute name="embedded10" type="java.lang.String" db-attribute-name="EMBEDDED10"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.generic"/>
 	<db-entity name="GENERIC1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.horizontalinherit"/>
 	<db-entity name="INHERITANCE_SUB_ENTITY1">
 		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.locking"/>
 	<db-entity name="DATE_LOCKING_TEST">
 		<db-attribute name="DATE_LOCK" type="DATE"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db1"/>
 	<db-entity name="CROSSDB_M1E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db2"/>
 	<db-entity name="CROSSDB_M2E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.mt"/>
 	<property name="clientSupported" value="true"/>
 	<property name="defaultClientPackage" value="org.apache.cayenne.testdo.mt"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.inherit"/>
 	<db-entity name="ADDRESS">
 		<db-attribute name="ADDRESS_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.qualified"/>
 	<db-entity name="QUALIFIED1">
 		<db-attribute name="DELETED" type="BOOLEAN"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.quotemap"/>
 	<property name="quoteSqlIdentifiers" value="true"/>
 	<db-entity name="QUOTE_ADRESS">

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.relationship"/>
 	<db-entity name="CLOB_DETAIL">
 		<db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
Tue May 12 03:08:21 2009
@@ -1,9 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="3.0">
 	<db-entity name="SUS1">
 		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 	</db-entity>
 	<db-entity name="SUS2">
 		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 	</db-entity>
-</data-map>
+</data-map>
\ No newline at end of file

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap-dependent.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap-dependent.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap-dependent.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap-dependent.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="1.1">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+	project-version="1.1">
 	<property name="defaultPackage" value="org.apache.art2"/>
 	<db-entity name="MYARTGROUP">
 		<db-attribute name="MY_GROUP_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
@@ -13,4 +16,4 @@
 		<db-attribute-pair source="MY_PARENT_GROUP_ID" target="GROUP_ID"/>
 	</db-relationship>
 	<obj-relationship name="toParentGroup" source="MyArtGroup" target="ArtGroup" deleteRule="Nullify"
db-relationship-path="toParentArtGroup"/>
-</data-map>
+</data-map>
\ No newline at end of file

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml?rev=773771&r1=773770&r2=773771&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
Tue May 12 03:08:21 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap ../../main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd"
+ project-version="3.0">
 	<property name="defaultPackage" value="org.apache.art"/>
 	<property name="defaultSuperclass" value="org.apache.cayenne.CayenneDataObject"/>
 	<property name="clientSupported" value="true"/>
@@ -650,4 +653,4 @@
 		<post-remove method-name="postRemoveDataMap"/>
 		<post-load method-name="postLoadDataMap"/>
 	</entity-listener>
-</data-map>
+</data-map>
\ No newline at end of file



Mime
View raw message