db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/schema ojbtest-schema.xml
Date Sat, 18 Dec 2004 19:28:47 GMT
brj         2004/12/18 11:28:47

  Modified:    src/schema ojbtest-schema.xml
  Log:
  create table in the correct sequence to allow foreign-key definitions
  
  Revision  Changes    Path
  1.90      +43 -42    db-ojb/src/schema/ojbtest-schema.xml
  
  Index: ojbtest-schema.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/schema/ojbtest-schema.xml,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- ojbtest-schema.xml	18 Dec 2004 14:01:16 -0000	1.89
  +++ ojbtest-schema.xml	18 Dec 2004 19:28:47 -0000	1.90
  @@ -284,6 +284,7 @@
       <column name="value1" required="false" type="VARCHAR" size="150"/>
       <column name="aOid" required="false" type="VARCHAR" size="48"/>
     </table>
  +
       <table name="RelatedToContract">
           <column name="pk" required="true" primaryKey="true" type="VARCHAR" size="48"/>
           <column name="relatedValue1" required="false" type="VARCHAR" size="150"/>
  @@ -360,6 +361,10 @@
           <column name="D_FIELD" required="false" type="VARCHAR" size="100"/>
       </table>
   
  +    <table name="TABLE_2">
  +        <column name="pk" required="true" primaryKey="true" type="INTEGER"/>
  +    </table>
  +
        <table name="TABLE_1">
           <column name="pk" required="true" primaryKey="true" type="INTEGER"/>
           <column name="fk_to_related" required="false" type="INTEGER"/>
  @@ -368,16 +373,15 @@
           </foreign-key>
       </table>
   
  -    <table name="TABLE_2">
  -        <column name="pk" required="true" primaryKey="true" type="INTEGER"/>
  -    </table>
  -
       <table name="BIDIR_A">
          <column name="pk" required="true" primaryKey="true" type="VARCHAR" size="48"/>
          <column name="fk_to_B" required="false" type="VARCHAR" size="48"/>
  +<!--
  +	BRJ : can't reference a table that is created later
          <foreign-key foreignTable="BIDIR_B">
            <reference local="fk_to_B" foreign="pk"/>
          </foreign-key>
  +-->
      </table>
   
      <table name="BIDIR_B">
  @@ -388,6 +392,11 @@
          </foreign-key>
      </table>
   
  +  <table name="ZOO">
  +    <column name="zooId" required="true" primaryKey="true" type="INTEGER"/>
  +    <column name="name" type="VARCHAR" size="60"/>
  +  </table>
  +
     <table name="MAMMAL">
       <column name="animalId" required="true" primaryKey="true" type="INTEGER"/>
       <column name="name" type="VARCHAR" size="60"/>
  @@ -410,11 +419,6 @@
       </foreign-key>
     </table>
   
  -  <table name="ZOO">
  -    <column name="zooId" required="true" primaryKey="true" type="INTEGER"/>
  -    <column name="name" type="VARCHAR" size="60"/>
  -  </table>
  -
     <table name="FISH">
       <column name="foodId" required="true" primaryKey="true" type="INTEGER"/>
       <column name="name" type="VARCHAR" size="60"/>
  @@ -815,6 +819,12 @@
           <column name="LENGTH_" type="DOUBLE"/>
       </table>
   
  +    <table name="REF_REGION">
  +        <column name="NAME" required="true" primaryKey="true" type="VARCHAR" size="150"/>
  +        <column name="COUNTRY" required="true" primaryKey="true" type="VARCHAR" size="150"/>
  +        <column name="DESCRIPTION" type="VARCHAR" size="150"/>
  +    </table>
  +
       <table name="REF_WINE">
           <column name="OBJ_ID" required="true" primaryKey="true" type="VARCHAR" size="100"/>
           <column name="REGION_NAME" type="VARCHAR" size="150" required="true"/>
  @@ -827,12 +837,6 @@
           </foreign-key>
       </table>
   
  -    <table name="REF_REGION">
  -        <column name="NAME" required="true" primaryKey="true" type="VARCHAR" size="150"/>
  -        <column name="COUNTRY" required="true" primaryKey="true" type="VARCHAR" size="150"/>
  -        <column name="DESCRIPTION" type="VARCHAR" size="150"/>
  -    </table>
  -
       <table name="REF_OBJ_A">
           <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
           <column name="NAME" type="VARCHAR" size="150"/>
  @@ -1216,6 +1220,11 @@
           <column name="NAME" type="VARCHAR" size="150"/>
       </table>
   
  +    <table name="INHERITANCE_MULTI_ADDRESS">
  +        <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
  +        <column name="STREET" type="VARCHAR" size="150"/>
  +    </table>
  +
       <table name="INHERITANCE_MULTI_EMPLOYEE">
           <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
           <column name="OBJ_ID_2" required="true" primaryKey="true" type="DECIMAL" size="15,0"/>
  @@ -1251,12 +1260,6 @@
   	    </foreign-key>
       </table>
   
  -    <table name="INHERITANCE_MULTI_ADDRESS">
  -        <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
  -        <column name="STREET" type="VARCHAR" size="150"/>
  -    </table>
  -
  -
       <!-- =================================================== -->
       <!-- Runtime reference setting test                      -->
       <!-- =================================================== -->
  @@ -1277,6 +1280,11 @@
       <!-- =================================================== -->
       <!-- Runtime reference setting test                      -->
       <!-- =================================================== -->
  +    <table name="RUNTIME_SETTING_ONE">
  +        <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
  +        <column name="NAME" type="VARCHAR" size="150"/>
  +    </table>
  +
        <table name="RUNTIME_SETTING_MAIN">
           <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
           <column name="NAME" type="VARCHAR" size="150"/>
  @@ -1286,11 +1294,6 @@
   	    </foreign-key>
       </table>
   
  -    <table name="RUNTIME_SETTING_ONE">
  -        <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
  -        <column name="NAME" type="VARCHAR" size="150"/>
  -    </table>
  -
       <table name="RUNTIME_SETTING_MANY">
           <column name="OBJ_ID" required="true" primaryKey="true" type="INTEGER"/>
           <column name="NAME" type="VARCHAR" size="150"/>
  @@ -1300,8 +1303,6 @@
   	    </foreign-key>
       </table>
   
  -
  -
       <!-- =================================================== -->
       <!-- MultiplesDBTest - PB-api                            -->
       <!-- =================================================== -->
  @@ -1418,6 +1419,18 @@
       <!--      Classes for OTM dependent objects test       -->
       <!-- ************************************************* -->
   
  +  <table name="OTM_ADDRESS"
  +         javaName="OtmAddress">
  +    <column name="ID" required="true" primaryKey="true" type="INTEGER"
  +            javaName="id"/>
  +    <column name="COUNTRY" type="VARCHAR" size="60"
  +            javaName="country"/>
  +    <column name="CITY" type="VARCHAR" size="60"
  +            javaName="city"/>
  +    <column name="STREET" type="VARCHAR" size="60"
  +            javaName="street"/>
  +  </table>
  +
     <table name="OTM_PERSON"
            javaName="OtmPerson">
       <column name="ID" required="true" primaryKey="true" type="INTEGER"
  @@ -1433,18 +1446,6 @@
       </foreign-key>
     </table>
   
  -  <table name="OTM_ADDRESS"
  -         javaName="OtmAddress">
  -    <column name="ID" required="true" primaryKey="true" type="INTEGER"
  -            javaName="id"/>
  -    <column name="COUNTRY" type="VARCHAR" size="60"
  -            javaName="country"/>
  -    <column name="CITY" type="VARCHAR" size="60"
  -            javaName="city"/>
  -    <column name="STREET" type="VARCHAR" size="60"
  -            javaName="street"/>
  -  </table>
  -
     <table name="OTM_ADDRESS_DESC"
            javaName="OtmAddressDesc">
       <column name="ID" required="true" primaryKey="true" type="INTEGER"
  @@ -1533,7 +1534,7 @@
   	<table name="INITIALIZABLE_OBJECT">
   		<column name="ID" primaryKey="true" type="BIGINT"/>
   	</table>
  -	
  +
   	<!-- ************ Object Factory tests * END -->
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message