db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/xdocs howto-use-anonymous-keys.xml
Date Sun, 31 Aug 2003 00:01:17 GMT
arminw      2003/08/30 17:01:17

  Modified:    xdocs    howto-use-anonymous-keys.xml
  Log:
  fix typo in example class
  
  Revision  Changes    Path
  1.3       +5 -5      db-ojb/xdocs/howto-use-anonymous-keys.xml
  
  Index: howto-use-anonymous-keys.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/howto-use-anonymous-keys.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- howto-use-anonymous-keys.xml	30 May 2003 12:48:32 -0000	1.2
  +++ howto-use-anonymous-keys.xml	31 Aug 2003 00:01:17 -0000	1.3
  @@ -107,7 +107,7 @@
           return this.wood;
       }
   
  -    public void setWood(String nom)
  +    public void setWood(String wood)
       {
           this.wood = wood;
       }
  @@ -122,7 +122,7 @@
           this.color = color;
       }
   }
  -    
  +
   public class Thing
   {
       private String name;
  @@ -161,14 +161,14 @@
       finish_id   INTEGER,
       FOREIGN KEY (finish_id) REFERENCES finish(id)
   );
  -    
  +
   CREATE TABLE drawer
   (
       id          INTEGER PRIMARY KEY,
       desk_id     INTEGER,
       FOREIGN KEY (desk_id) REFERENCES desk(id)
   );
  -    
  +
   CREATE TABLE thing
   (
       id          INTEGER PRIMARY KEY,
  @@ -186,7 +186,7 @@
               When we go to map the classes to the database, it is almost a one-to-one property
to field mapping. The exception here is the primary key on each entity. This is meaningless
information in Java, so we would like to keep it out of the object model. Anonymous access
keys allow us to do that.
           </p>
           <p>
  -            The repository.xml must know about the database columns used for referential
integrity, but OJB can maintain the foreign key relationships behind the scenes - freeing
the developer to focus on more accurate modeling of her objects to the problem, instead of
the the persistance mechanism. Doing this is also very simple - in the repository.xml file
mark the field descriptors with a <code>access="anonymous"</code> attribute. 
  +            The repository.xml must know about the database columns used for referential
integrity, but OJB can maintain the foreign key relationships behind the scenes - freeing
the developer to focus on more accurate modeling of her objects to the problem, instead of
the the persistance mechanism. Doing this is also very simple - in the repository.xml file
mark the field descriptors with a <code>access="anonymous"</code> attribute.
           </p>
           <source><![CDATA[
   <class-descriptor
  
  
  

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