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/xdocs tutorial3.xml
Date Mon, 27 Oct 2003 18:17:05 GMT
brj         2003/10/27 10:17:05

  Modified:    xdocs    tutorial3.xml
  Log:
  added some warnings
  
  Revision  Changes    Path
  1.30      +17 -2     db-ojb/xdocs/tutorial3.xml
  
  Index: tutorial3.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/tutorial3.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- tutorial3.xml	4 Sep 2003 11:35:49 -0000	1.29
  +++ tutorial3.xml	27 Oct 2003 18:17:05 -0000	1.30
  @@ -1366,7 +1366,10 @@
   ]]></source>
   
   <p>
  -    OJB provides direct support for all three approaches.
  +    OJB provides direct support for all three approaches. <br/>
  +    <b>But it's currently not recommended to mix mapping strategies
  +    within the same hierarchy !</b> 
  +    <br/>
       In the following we demonstrate how these mapping
       approaches can be implemented by using OJB.
   </p>
  @@ -1388,6 +1391,10 @@
       attribute <code>ojbConcreteClass</code>. On
       loading objects from the table OJB checks this attribute and
       instantiates objects of this type.
  +    <br/>
  +    <b>The criterion for <code>ojbConcreteClass</code> is statically
added to the 
  +    query in class <code>QueryFactory</code> and it therefore appears in 
  +    the select-statement for each extent. This means that mixing mapping strategies should
be avoided.</b> 
   </p>
   <p>
       There is sample code for this feature in the method
  @@ -1610,6 +1617,14 @@
   <p>
   Auto-update must be <b>true</b> (this is the default) to force insertion of
A when inserting B.
   So you'd better not define any auto-settings for this reference-descriptor !
  +</p>
  +<p>
  +<b>
  +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 
  +lead to problems (instatiating the wrong class) because the primary key is not
  +unique within the hiearchy defined in the repository.
  +</b>
   </p>
   <p>
   Attributes from the super-class A can be used the same way as attributes of B when querying
for B.
  
  
  

---------------------------------------------------------------------
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