You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2005/12/18 03:14:39 UTC

cvs commit: db-ojb/src/doc/forrest/src/documentation/resources/images mapping_inheritance_example.png

arminw      2005/12/17 18:14:39

  Modified:    src/doc/forrest/src/documentation/content/xdocs/docu/guides
                        Tag: OJB_1_0_RELEASE advanced-technique.xml
                        query.xml repository.xml
               src/doc/forrest/src/documentation/content/xdocs Tag:
                        OJB_1_0_RELEASE site.xml
  Added:       src/doc/forrest/src/documentation/resources/images Tag:
                        OJB_1_0_RELEASE mapping_inheritance_example.png
  Log:
  update mapping part 2
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.9   +338 -167  db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml
  
  Index: advanced-technique.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/advanced-technique.xml,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- advanced-technique.xml	17 Dec 2005 01:39:41 -0000	1.1.2.8
  +++ advanced-technique.xml	18 Dec 2005 02:14:38 -0000	1.1.2.9
  @@ -213,16 +213,23 @@
           </section>
   
   
  +
           <section>
               <title>Mapping Inheritance Hierarchies</title>
               <p>
                   In the literature on object/relational mapping the
                   problem of mapping inheritance hierarchies to RDBMS has been
  -                widely covered. Have a look at the
  -                following inheritance hierarchy:
  +                widely covered. In the following sections we will use a simple inheritance
  +                example to show the different inheritance mapping strategies.
  +            </p>
  +            <anchor id="mapping-inheritance-example"/>
  +            <p>
  +                Assume we have a base class <code>Employee</code> and class <code>Executive</code>
  +                extends <code>Employee</code>. Further on class <code>Manager</code> extends
  +                <code>Executive</code>.
               </p>
               <p>
  -                <img src="images/inheritance-1.gif" alt="inheritance-1.gif"/>
  +                <img src="images/mapping_inheritance_example.png" alt="mapping-inheritance.png"/>
               </p>
               <p>
                   If we have to define database tables that have to contain these classes
  @@ -232,53 +239,20 @@
                   <li>
                       <p>
                           <a href="#table-per-class">Map each class of a hierarchy to a distinct table</a> and have all
  -                        attributes from the base class in the derived class. DDL for the
  -                        table could look like:
  +                        attributes from the base class in the derived class.
                       </p>
  -            <source><![CDATA[
  -CREATE TABLE A
  -(
  -    ID                 INT NOT NULL PRIMARY KEY,
  -    SOME_VALUE_FROM_A  INT
  -)
  -CREATE TABLE B
  -(
  -    ID                 INT NOT NULL PRIMARY KEY,
  -    SOME_VALUE_FROM_A  INT,
  -    SOME_VALUE_FROM_B  INT
  -)]]></source>
                   </li>
                   <li>
                       <p>
  -                        <a href="#table-per-hierarchy">Map class hierarchy onto one table</a>. A DDL for the table would look like:
  -                </p>
  -            <source><![CDATA[
  -CREATE TABLE A_EXTENT
  -(
  -    ID                 INT NOT NULL PRIMARY KEY,
  -    SOME_VALUE_FROM_A  INT,
  -    SOME_VALUE_FROM_B  INT
  -    CLASS_NAME         VARCHAR(150)
  -)]]></source>
  +                        <a href="#table-per-hierarchy">Map class hierarchy onto one table</a>.
  +                    </p>
                   </li>
                   <li>
                       <p>
                           <a href="#table-per-subclass">Map subclass fields of a hierarchy to a distinct table</a>,
                           but do not map super class fields to derived classes. Use joins to materialize over
  -                        all tables to materialize objects. DDL for the table would look
  -                        like:
  +                        all tables to materialize objects.
                       </p>
  -            <source><![CDATA[
  -CREATE TABLE A
  -(
  -    ID                 INT NOT NULL PRIMARY KEY,
  -    SOME_VALUE_FROM_A  INT
  -)
  -CREATE TABLE B
  -(
  -    ID               INT NOT NULL PRIMARY KEY,
  -    SOME_VALUE_FROM_B  INT
  -)]]></source>
                   </li>
               </ol>
               <p>
  @@ -291,17 +265,153 @@
                   approaches can be implemented by using OJB.
               </p>
   
  +
               <anchor id="table-per-class"/>
               <section>
                   <title>Mapping Each Class of a Hierarchy to a Distinct Table (table per class)</title>
                   <p>
                       This is the most simple solution. Just write a complete
  -                    <a href="site:repository/class-descriptor">ClassDescriptor</a> for each class that contains
  +                    <a href="site:repository/class-descriptor">ClassDescriptor</a> with
                       <a href="site:repository/field-descriptor">FieldDescriptors</a> for all
                       of the attributes, including inherited attributes.
                   </p>
  +                <anchor id="classes-inheritance-example"/>
  +                <p>
  +                    The classes of our <a href="#mapping-inheritance-example">mapping example</a>
  +                    would look like:
  +                </p>
  +                <source><![CDATA[
  +public class Employee implements Serializable
  +{
  +    private Integer id;
  +    private String name;
  +
  +    public Employee()
  +    {
  +    }
  +....
  +// getter/setter for id and ojbConcreteClass
  +}
  +
  +public class Executive extends Employee
  +{
  +    private String department;
  +....
  +// getter/setter
  +}
  +
  +public class Manager extends Executive
  +{
  +    private int consortiumKey;
  +....
  +// getter/setter
  +}]]></source>
  +                <p>
  +                    The <a href="site:repository/class-descriptor">ClassDescriptors</a> include all fields
  +                    of the representing java-class and each descriptor points to a different table:
  +                </p>
  +                <source><![CDATA[
  +<class-descriptor
  +    class="Employee"
  +    table="EMPLOYEE"
  +>
  +    <extent-class class-ref="Executive" />
  +    <field-descriptor
  +        name="id"
  +        column="ID"
  +        jdbc-type="INTEGER"
  +        primarykey="true"
  +        autoincrement="true"
  +    />
  +    <field-descriptor
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
  +    />
  +</class-descriptor>
  +
  +<class-descriptor
  +    class="Executive"
  +    table="EXECUTIVE"
  +>
  +    <extent-class class-ref="Manager" />
  +    <field-descriptor
  +        name="id"
  +        column="ID"
  +        jdbc-type="INTEGER"
  +        primarykey="true"
  +        autoincrement="true"
  +    />
  +    <field-descriptor
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
  +    />
  +    <field-descriptor
  +        name="department"
  +        column="DEPARTMENT"
  +        jdbc-type="VARCHAR"
  +    />
  +</class-descriptor>
  +
  +<class-descriptor
  +    class="Manager"
  +    table="MANAGER"
  +>
  +    <field-descriptor
  +        name="id"
  +        column="ID"
  +        jdbc-type="INTEGER"
  +        primarykey="true"
  +        autoincrement="true"
  +    />
  +    <field-descriptor
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
  +    />
  +    <field-descriptor
  +        name="department"
  +        column="DEPARTMENT"
  +        jdbc-type="VARCHAR"
  +    />
  +    <field-descriptor
  +        name="consortiumKey"
  +        column="CONSORTIUM_KEY"
  +        jdbc-type="INTEGER"
  +    />
  +</class-descriptor>
  +                ]]></source>
  +                <p>
  +                    The <a href="site:repository/extent-class"><em>extent-class</em> element</a> is
  +                    needed to declare the inheritance between the classes.
  +                </p>
  +                <p>
  +                    The DDL for the tables would look like:
  +                </p>
  +            <source><![CDATA[
  +CREATE TABLE EMPLOYEE
  +(
  +    ID      INT NOT NULL PRIMARY KEY,
  +    NAME    VARCHAR(150)
  +)
  +CREATE TABLE EXECUTIVE
  +(
  +    ID      INT NOT NULL PRIMARY KEY,
  +    NAME    VARCHAR(150),
  +    DEPARTMENT    VARCHAR(150)
  +)
  +CREATE TABLE MANAGER
  +(
  +    ID              INT NOT NULL PRIMARY KEY,
  +    NAME            VARCHAR(150),
  +    DEPARTMENT      VARCHAR(150),
  +    CONSORTIUM_KEY  INT
  +)]]></source>
               </section>
   
  +
  +
               <anchor id="table-per-hierarchy"/>
               <section>
                   <title>Mapping Class Hierarchy on the Same Table (table per hierarchy)</title>
  @@ -310,15 +420,14 @@
                       only one special situation that needs some attention:
                   </p>
                   <p>
  -                    Say there is a baseclass <code>AB</code> with derived classes <code>B</code> and <code>B1</code>.
  -                    B and B1 are mapped on a table <em>AB_TABLE</em>. Storing B and B1 objects to this table
  -                    works fine. But now consider a Query against the baseclass AB. How
  -                    can the correct type of the stored objects be determined?
  +                    Storing <code>Employee, Executive</code> and <code>Manager</code> objects to this table
  +                    works fine. But now consider a Query against the baseclass <code>Employee</code>.
  +                    How can the correct type of the stored objects be determined?
                   </p>
                   <p>
                       OJB needs a <em>discriminator column</em> of type CHAR or VARCHAR that contains the
  -                    classname to be used for instantiation. This column must be mapped on a special
  -                    attribute <code>ojbConcreteClass</code>. On loading objects from the table OJB
  +                    class name to be used for instantiation. This column must be mapped on a special
  +                    attribute <code>ojbConcreteClass</code>. On loading objects from the table, OJB
                       checks this attribute and instantiates objects of this type.
                   </p>
                   <note>
  @@ -328,90 +437,93 @@
                       mixing mapping strategies should be avoided.
                   </note>
                   <p>
  -                    There is sample code for this feature in the method
  -                    <code>org.apache.ojb.broker.PersistenceBrokerTest.testMappingToOneTable().</code>
  -                    See the mapping details in the following
  -                    <a href="site:class-descriptor">class declaration</a> and the
  -                    <a href="site:repository">respective mapping</a> (all classes are static inner classes of
  -                    class <code>ObjectRepository</code>, this is only for test purpose - ignore this):
  +                    The classes of our <a href="#mapping-inheritance-example">mapping example</a>
  +                    would look like:
                   </p>
                   <source><![CDATA[
  -public static abstract class AB implements Serializable
  +public class Employee implements Serializable
   {
  -    private int id;
  +    private Integer id;
       /**
        * This special attribute telling OJB which concrete class
        * this Object has.
        * NOTE: this attribute MUST be called ojbConcreteClass
        */
       private String ojbConcreteClass;
  +    private String name;
   
  -    protected AB()
  +    public Employee()
       {
           // this guarantee that always the correct class name will be set
           this.ojbConcreteClass = this.getClass().getName();
       }
  -
  -    protected AB(int id)
  -    {
  -        this();
  -        this.id = id;
  -    }
   ....
   // getter/setter for id and ojbConcreteClass
   }
   
  -public static class B extends AB
  +public class Executive extends Employee
   {
  -    private int someValue;
  -    private String someBField;
  +    private String department;
   
  -    public B()
  +    public Executive()
       {
           super();
       }
  -
  -    public B(int pId, int pSomeValue)
  -    {
  -        super(pId);
  -        this.someValue = pSomeValue;
  -    }
   ....
   // getter/setter
   }
   
  -public static class B1 extends B
  +public class Manager extends Executive
   {
  -    public B1()
  -    {
  -        super();
  -    }
  +    private int consortiumKey;
   
  -    public B1(int pId, int pSomeValue)
  +    public Manager()
       {
  -        super(pId, pSomeValue);
  +        super();
       }
  +....
  +// getter/setter
   }]]></source>
                   <note>
  -                    The getter/setter for attribute <code>ojbConcreteClass</code> in class <code>AB</code>
  -                    is only needed if OJB is forced to use
  +                    Getter/setter for attribute <code>ojbConcreteClass</code> in base class <code>Employee</code>
  +                    are only needed if OJB is forced to use
                       <a href="site:advanced-technique/persistent-field">getter/setter for field access</a>.
                   </note>
                   <p>
  -                    Here is the metadata mapping for the abstract base class <code>AB</code>
  -                    and class <code>B</code>:
  +                    Here are the metadata mappings of our
  +                    <a href="#mapping-inheritance-example">mapping example</a>:
                   </p>
                   <source><![CDATA[
  -<class-descriptor class="org.apache.ojb.broker.ObjectRepository$AB">
  -    <extent-class class-ref="org.apache.ojb.broker.ObjectRepository$A" />
  -    <extent-class class-ref="org.apache.ojb.broker.ObjectRepository$B" />
  +<class-descriptor
  +    class="Employee"
  +    table="MANPOWER"
  +>
  +    <extent-class class-ref="Executive" />
  +
  +    <field-descriptor
  +        name="id"
  +        column="ID"
  +        jdbc-type="INTEGER"
  +        primarykey="true"
  +        autoincrement="true"
  +    />
  +    <field-descriptor
  +        name="ojbConcreteClass"
  +        column="CLASS_NAME"
  +        jdbc-type="VARCHAR"
  +    />
  +    <field-descriptor
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
  +    />
   </class-descriptor>
   
   <class-descriptor
  -    class="org.apache.ojb.broker.ObjectRepository$B"
  -    table="AB_TABLE"
  +    class="Executive"
  +    table="MANPOWER"
   >
  -    <extent-class class-ref="org.apache.ojb.broker.ObjectRepository$B1" />
  +    <extent-class class-ref="Manager" />
   
       <field-descriptor
           name="id"
  @@ -426,20 +538,20 @@
           jdbc-type="VARCHAR"
       />
       <field-descriptor
  -        name="someValue"
  -        column="VALUE_"
  -        jdbc-type="INTEGER"
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
       />
       <field-descriptor
  -        name="someBField"
  -        column="B_FIELD"
  +        name="department"
  +        column="DEPARTMENT"
           jdbc-type="VARCHAR"
       />
   </class-descriptor>
   
   <class-descriptor
  -    class="org.apache.ojb.broker.ObjectRepository$B1"
  -    table="AB_TABLE"
  +    class="Manager"
  +    table="MANPOWER"
   >
       <field-descriptor
           name="id"
  @@ -454,20 +566,43 @@
           jdbc-type="VARCHAR"
       />
       <field-descriptor
  -        name="someValue"
  -        column="VALUE_"
  -        jdbc-type="INTEGER"
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
       />
       <field-descriptor
  -        name="someBField"
  -        column="B_FIELD"
  +        name="department"
  +        column="DEPARTMENT"
           jdbc-type="VARCHAR"
       />
  -</class-descriptor>]]></source>
  +    <field-descriptor
  +        name="consortiumKey"
  +        column="CONSORTIUM_KEY"
  +        jdbc-type="INTEGER"
  +    />
  +</class-descriptor>
  +]]></source>
                   <p>
                       The column <code>CLASS_NAME</code> is used to store the concrete type of each
                       object.
                   </p>
  +                <p>
  +                    The <a href="site:repository/extent-class"><em>extent-class</em> element</a> is
  +                    needed to declare the inheritance between the classes.
  +                </p>
  +                <p>
  +                    The DDL for the table would look like:
  +                </p>
  +            <source><![CDATA[
  +CREATE TABLE MANPOWER
  +(
  +    ID      INT NOT NULL PRIMARY KEY,
  +    CLASS_NAME      VARCHAR(150)
  +    NAME    VARCHAR(150),
  +    DEPARTMENT      VARCHAR(150),
  +    CONSORTIUM_KEY  INT
  +)]]></source>
  +
   
                   <anchor id="own-discriminator"/>
                   <section>
  @@ -528,39 +663,31 @@
                   </section>
               </section>
   
  +
  +
               <anchor id="table-per-subclass"/>
               <section>
                   <title>Mapping Each Subclass to a Distinct Table (table per subclass)</title>
                   <p>
  -                    ### TODO: document changes made in 1.0.4 ###
  +                    This mapping strategy maps all subclass fields of a hierarchy to a distinct table
  +                    (but do not map super class fields to derived class tables - except the
  +                    <a href="site:repository/primary-key">primary key</a> fields) and use joins to
  +                    materialize over all tables to materialize the objects.
                   </p>
                   <p>
  -                    Here are the definitions for the classes A and B:
  +                    The classes of the inheritance hierarchy don't need any specific fields or
  +                    settings, thus our <a href="#mapping-inheritance-example">mapping example</a>
  +                    java-classes look would look like the classes for the
  +                    <a href="#classes-inheritance-example">table-per-class mapping</a>.
                   </p>
  -                <source><![CDATA[
  -public class A
  -{
  -    // primary key
  -    int id;
  -    // mapped to a column in A_TABLE
  -    int someValueFromA;
  -}
  -
  -public class B extends A
  -{
  -    // id is primary key and serves also as foreign key referencing A.id
  -    int id;
  -    // mapped to a column in B_TABLE
  -    int someValueFromB;
  -}]]></source>
                   <p>
  -                    The next code block contains the class-descriptors for the the classes A and B.
  +                    The next code block contains the <a href="site:repository/class-descriptor">class-descriptors</a> of our
  +                    <a href="#mapping-inheritance-example">mapping example</a>.
                   </p>
                   <source><![CDATA[
  -<!-- Definitions for org.apache.ojb.broker.A -->
   <class-descriptor
  -    class="org.apache.ojb.broker.A"
  -    table="A_TABLE"
  +    class="Employee"
  +    table="EMPLOYEE"
   >
       <field-descriptor
           name="id"
  @@ -570,80 +697,121 @@
           autoincrement="true"
       />
       <field-descriptor
  -        name="someValueFromA"
  -        column="VALUE_"
  -        jdbc-type="INTEGER"
  +        name="name"
  +        column="NAME"
  +        jdbc-type="VARCHAR"
       />
   </class-descriptor>
   
   <class-descriptor
  -    class="org.apache.ojb.broker.B"
  -    table="B_TABLE"
  +    class="Executive"
  +    table="EXECUTIVE"
   >
       <field-descriptor
           name="id"
           column="ID"
           jdbc-type="INTEGER"
           primarykey="true"
  -        autoincrement="true"
  +    />
  +    <field-descriptor
  +        name="department"
  +        column="DEPARTMENT"
  +        jdbc-type="VARCHAR"
       />
   
  +    <reference-descriptor name="super"
  +        class-ref="Employee"
  +    >
  +        <foreignkey field-ref="id"/>
  +    </reference-descriptor>
  +</class-descriptor>
  +
  +<class-descriptor
  +    class="Manager"
  +    table="MANAGER"
  +>
  +    <field-descriptor
  +        name="id"
  +        column="ID"
  +        jdbc-type="INTEGER"
  +        primarykey="true"
  +    />
       <field-descriptor
  -        name="someValueFromB"
  -        column="VALUE_"
  +        name="consortiumKey"
  +        column="CONSORTIUM_KEY"
           jdbc-type="INTEGER"
       />
   
       <reference-descriptor name="super"
  -        class-ref="org.apache.ojb.broker.A"
  -        auto-retrieve="true"
  -        auto-update="true"
  -        auto-delete="true"
  +        class-ref="Executive"
       >
           <foreignkey field-ref="id"/>
       </reference-descriptor>
   </class-descriptor>]]></source>
                   <p>
  -                    As you can see from this mapping we need a special reference-descriptor
  -                    that advises OJB to load the values for the inherited
  -                    attributes from class
  -                    <code>A</code> by a JOIN using the
  -                    <code>(B.id == A.id)</code> foreign key reference.
  -                </p>
  -                <p>
  -                    The
  -                    <code>name="super"</code> is not used to address an actual
  -                    attribute of the class
  -                    <code>B</code> but as a marker
  -                    keyword defining the JOIN to the baseclass.
  -                </p>
  -                <p>
  -                    Auto-update must be
  -                    <strong>true</strong> to force insertion of A when inserting B.
  -                    So have to define a
  -                    <em>auto-update</em> true setting for this reference-descriptor!
  -                    In most cases it's also useful to enable
  -                    <em>auto-delete</em>.
  +                    The mapping for the base class <code>Employee</code> is ordinary and we using
  +                    an <a href="site:repository/autoincrement"><em>autoincrement</em></a> primary key field.
  +                    <br/>
  +                    In the sub-classes <code>Executive</code> and <code>Manager</code> it's not allowed
  +                    to use <em>autoincrement</em> primary keys, because OJB will automatically copy the
  +                    primary keys of the base class to all sub-classes.
  +                </p>
  +                <p>
  +                    As you can see this mapping needs a special
  +                    <a href="site:repository/reference-descriptor">reference-descriptor</a>
  +                    in the sub-classes <code>Executive</code> and <code>Manager</code> that advises OJB to load
  +                    the values for the inherited attributes from the super-class by a <em>JOIN</em> using the
  +                    foreign key reference.
  +               <br/>
  +                    The <code>name="super"</code> attribute is not used to address an actual
  +                    attribute of the super-class but as a marker keyword defining the <em>JOIN</em>
  +                    to the super-class.
                   </p>
                   <note>
  -                    Be aware that this sample does not declare
  -                    <code>org.apache.ojb.broker.B</code>
  -                    to be an extent of
  -                    <code>org.apache.ojb.broker.A</code>. Using extents here will
  +                    1. The <a href="site:basic-technique/cascading"><em>auto-xxx</em> attributes</a> and the
  +                    <a href="site:basic-technique/reference-proxy"><em>proxy</em> attribute</a>
  +                    will be ignored when using the <em>super</em> keyword.
  +                    <br/>
  +                    <br/>
  +                    2. Be aware that this sample does not declare <code>Executive</code> or <code>Manager</code>
  +                    to be an extent of <code>Employee</code>. Using <em>extents</em> here will
                       lead to problems (instatiating the wrong class) because the primary key is not
  -                    unique within the hiearchy defined in the repository.
  +                    unique within the hierarchy defined in the <a href="site:repository">repository</a>.
                   </note>
                   <p>
  -                    Attributes from the super-class A can be used the same way as attributes of B when querying for B.
  -                    No path-expression is needed in this case:
  +                    The DDL for the tables would look like:
  +                </p>
  +            <source><![CDATA[
  +CREATE TABLE EMPLOYEE
  +(
  +    ID      INT NOT NULL PRIMARY KEY,
  +    NAME    VARCHAR(150)
  +)
  +CREATE TABLE EXECUTIVE
  +(
  +    ID      INT NOT NULL PRIMARY KEY,
  +    DEPARTMENT    VARCHAR(150)
  +)
  +CREATE TABLE MANAGER
  +(
  +    ID              INT NOT NULL PRIMARY KEY,
  +    CONSORTIUM_KEY  INT
  +)]]></source>
  +                <p>
  +                    Attributes from the base- or super-class or can be used the same way as attributes
  +                    of the target class when querying e.g. for <code>Manager</code>.
  +                    No <a href="site:query/joins">path-expression</a> is needed in this case:
                   </p>
                   <source><![CDATA[
   Criteria c = new Criteria();
  -c.addEqualTo("someValueFromA", new Integer(1));
  -c.addEqualTo("someValueFromB", new Integer(2));
  -Query q = QueryFactory.newQuery(B.class, c);
  +c.addEqualTo("name", "Kent");
  +c.addEqualTo("department", "press");
  +Query q = QueryFactory.newQuery(Executive.class, c);
   broker.getCollectionByQuery(q);]]></source>
                   <p>
  +                    ####### TODO: update docs for 1.0.4 #####
  +                </p>
  +                <p>
                       The above example is based on the assumption that the primary key attribute
                       <code>B.id</code> and its underlying column
                       <code>B_TABLE.ID</code>
  @@ -778,6 +946,9 @@
               </section>
           </section>
   
  +
  +
  +
           <anchor id="interfaces"/>
           <section>
               <title>Using interfaces with OJB</title>
  
  
  
  1.1.2.5   +2 -1      db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml
  
  Index: query.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- query.xml	14 Dec 2005 01:19:19 -0000	1.1.2.4
  +++ query.xml	18 Dec 2005 02:14:38 -0000	1.1.2.5
  @@ -299,6 +299,7 @@
   			</note>
               </section>
   
  +            <anchor id="joins"/>
               <section>
                   <title>joins</title>
                   <p>
  
  
  
  1.1.2.15  +22 -21    db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- repository.xml	14 Dec 2005 01:19:19 -0000	1.1.2.14
  +++ repository.xml	18 Dec 2005 02:14:38 -0000	1.1.2.15
  @@ -1103,25 +1103,23 @@
               </section>
           </section>
   
  -            <section>
  -                <title>extent-class</title>
  -                <p>
  -                    An extent-class element is used to specify an implementing class or a
  -                    derived class that belongs to the extent of all instances of the
  -                    interface or base class.
  -                </p>
  -                <source><![CDATA[
  -<!ELEMENT extent-class EMPTY>
  -]]></source>
  -                <p>
  -                    The <em>class-ref</em> attribute must contain a fully qualified classname and
  -                    the repository file must contain a class-descriptor for this class.
  -                </p>
  -                <source><![CDATA[
  -<!ATTLIST extent-class
  -    class-ref IDREF #REQUIRED
  ->]]></source>
  -            </section>
  +        <anchor id="extent-class"/>
  +        <section>
  +            <title>extent-class</title>
  +            <p>
  +                An extent-class element is used to specify an implementing class or a
  +                derived class that belongs to the extent of all instances of the
  +                interface or base class.
  +            </p>
  +            <source><![CDATA[
  +<!ELEMENT extent-class EMPTY>]]></source>
  +            <p>
  +                The <em>class-ref</em> attribute must contain a fully qualified classname and
  +                the repository file must contain a class-descriptor for this class.
  +            </p>
  +            <source><![CDATA[
  +<!ATTLIST extent-class class-ref IDREF #REQUIRED>]]></source>
  +        </section>
   
   
               <anchor id="field-descriptor"/>
  @@ -1170,9 +1168,11 @@
                       Java attribute by reflection - OJB use the java/jdbc mapping desribed
                       <a href="site:jdbc-types">here</a>.
                   </p>
  +                <anchor id="primary-key"/>
                   <p>
                       The <em>primarykey</em> specifies if the column is a primary key column, default
  -                    value is <em>false</em>.
  +                    value is <em>false</em>. It's possible to auto assign primary key fields, more
  +                    info see <a href="#autoincrement">autoincrement section</a>
                   </p>
                   <p>
                       The <em>nullable</em> attribute specifies if the column may contain null values.
  @@ -1180,6 +1180,7 @@
                   <p>
                       The <em>indexed</em> attribute specifies if there is an index on this column
                   </p>
  +                <anchor id="autoincrement"/>
                   <p>
                       The <em>autoincrement</em> attribute specifies if the values for the persistent
                       attribute should be automatically generated by OJB. More info about
  
  
  
  No                   revision
  No                   revision
  1.3.2.23  +5 -1      db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.3.2.22
  retrieving revision 1.3.2.23
  diff -u -r1.3.2.22 -r1.3.2.23
  --- site.xml	17 Dec 2005 01:39:41 -0000	1.3.2.22
  +++ site.xml	18 Dec 2005 02:14:38 -0000	1.3.2.23
  @@ -139,6 +139,9 @@
                   <reference-descriptor href="#reference-descriptor"/>
                   <sequence-manager href="#sequence-manager"/>
                   <query-customizer href="#query-customizer"/>
  +                <primary-key href="#primary-key"/>
  +                <autoincrement href="#autoincrement"/>
  +                <extent-class href="#extent-class"/>
               </repository>
               <basic-technique label="Basic mapping" href="basic-technique.html">
                   <one-to-one href="#one-to-one"/>
  @@ -174,6 +177,7 @@
               </advanced-technique>
               <query label="OJB queries" href="query.html">
                   <query-by-criteria href="#query-by-criteria"/>
  +                <joins href="#joins"/>
                   <odmg-oql href="#odmg-oql"/>
                   <jdo-oql href="#jdo-oql"/>
                   <prefetched-relationships href="#prefetched-relationships"/>
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +6 -0      db-ojb/src/doc/forrest/src/documentation/resources/images/Attic/mapping_inheritance_example.png
  
  	<<Binary file>>
  
  

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