Update of /cvsroot/cayenne/cayenne/src/tutorials/cayenne-cmd-app
In directory usw-pr-cvs1:/tmp/cvs-serv17421/src/tutorials/cayenne-cmd-app
Modified Files:
cayenne.xml datamap.xml
Log Message:
fixed documentation and code for command line tutorial
Index: cayenne.xml
===================================================================
RCS file: /cvsroot/cayenne/cayenne/src/tutorials/cayenne-cmd-app/cayenne.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cayenne.xml 1 Oct 2002 05:12:26 -0000 1.1
+++ cayenne.xml 2 Oct 2002 04:11:43 -0000 1.2
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<domains>
<domain name="DefaultDomain">
- <map name="datamap" location="datamap.xml"/>
+ <map name="datamap" location="datamap.xml"/>
<node name="datanode"
datasource="driverinfo.xml"
adapter="org.objectstyle.cayenne.dba.mysql.MySQLAdapter"
Index: datamap.xml
===================================================================
RCS file: /cvsroot/cayenne/cayenne/src/tutorials/cayenne-cmd-app/datamap.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- datamap.xml 1 Oct 2002 05:12:26 -0000 1.1
+++ datamap.xml 2 Oct 2002 04:11:43 -0000 1.2
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<data-map>
- <db-entity name="ARTIST" schema="">
- <db-attribute name="DATE_OF_BIRTH" type="TIME" length="8"/>
+ <db-entity name="ARTIST">
<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="11"/>
<db-attribute name="ARTIST_NAME" type="CHAR" isMandatory="true" length="255"/>
+ <db-attribute name="DATE_OF_BIRTH" type="DATE" length="8"/>
</db-entity>
- <db-entity name="GALLERY" schema="">
+ <db-entity name="GALLERY">
<db-attribute name="GALLERY_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="11"/>
<db-attribute name="GALLERY_NAME" type="VARCHAR" isMandatory="true" length="100"/>
</db-entity>
- <db-entity name="PAINTING" schema="">
- <db-attribute name="PAINTING_TITLE" type="VARCHAR" isMandatory="true" length="255"/>
- <db-attribute name="GALLERY_ID" type="INTEGER" length="11"/>
+ <db-entity name="PAINTING">
+ <db-attribute name="ARTIST_ID" type="INTEGER" length="11"/>
<db-attribute name="ESTIMATED_PRICE" type="DECIMAL" length="10"/>
+ <db-attribute name="GALLERY_ID" type="INTEGER" length="11"/>
<db-attribute name="PAINTING_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="11"/>
- <db-attribute name="ARTIST_ID" type="INTEGER" length="11"/>
+ <db-attribute name="PAINTING_TITLE" type="VARCHAR" isMandatory="true" length="255"/>
</db-entity>
<obj-entity name="Artist" className="test.Artist" dbEntityName="ARTIST">
- <obj-attribute name="dateOfBirth" type="java.sql.Time" db-attribute-name="DATE_OF_BIRTH"/>
<obj-attribute name="artistName" type="java.lang.String" db-attribute-name="ARTIST_NAME"/>
+ <obj-attribute name="dateOfBirth" type="java.sql.Date" db-attribute-name="DATE_OF_BIRTH"/>
</obj-entity>
<obj-entity name="Gallery" className="test.Gallery" dbEntityName="GALLERY">
<obj-attribute name="galleryName" type="java.lang.String" db-attribute-name="GALLERY_NAME"/>
@@ -33,22 +33,22 @@
<db-relationship name="paintingArray" source="GALLERY" target="PAINTING" toDependentPK="false" toMany="true">
<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
</db-relationship>
- <db-relationship name="toGallery" source="PAINTING" target="GALLERY" toDependentPK="false" toMany="false">
- <db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
- </db-relationship>
<db-relationship name="toArtist" source="PAINTING" target="ARTIST" toDependentPK="false" toMany="false">
<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
</db-relationship>
+ <db-relationship name="toGallery" source="PAINTING" target="GALLERY" toDependentPK="false" toMany="false">
+ <db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+ </db-relationship>
<obj-relationship name="paintingArray" source="Artist" target="Painting" toMany="true">
<db-relationship-ref source="ARTIST" target="PAINTING" name="paintingArray"/>
</obj-relationship>
<obj-relationship name="paintingArray" source="Gallery" target="Painting" toMany="true">
<db-relationship-ref source="GALLERY" target="PAINTING" name="paintingArray"/>
</obj-relationship>
- <obj-relationship name="toGallery" source="Painting" target="Gallery" toMany="false">
- <db-relationship-ref source="PAINTING" target="GALLERY" name="toGallery"/>
- </obj-relationship>
<obj-relationship name="toArtist" source="Painting" target="Artist" toMany="false">
<db-relationship-ref source="PAINTING" target="ARTIST" name="toArtist"/>
+ </obj-relationship>
+ <obj-relationship name="toGallery" source="Painting" target="Gallery" toMany="false">
+ <db-relationship-ref source="PAINTING" target="GALLERY" name="toGallery"/>
</obj-relationship>
</data-map>
|