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 Fri, 29 Aug 2003 21:19:26 GMT
brj         2003/08/29 14:19:26

  Modified:    xdocs    tutorial3.xml
  additional doc for multiple joined tables
  Revision  Changes    Path
  1.28      +18 -1     db-ojb/xdocs/tutorial3.xml
  Index: tutorial3.xml
  RCS file: /home/cvs/db-ojb/xdocs/tutorial3.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- tutorial3.xml	8 Aug 2003 23:59:13 -0000	1.27
  +++ tutorial3.xml	29 Aug 2003 21:19:25 -0000	1.28
  @@ -1608,6 +1608,23 @@
   keyword defining the JOIN to the baseclass.
  +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 !
  +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:
  +Criteria c = new Criteria();
  +c.addEqualTo("someValueFromA", new Integer(1));
  +c.addEqualTo("someValueFromB", new Integer(2));
  +Query q = QueryFactory.newQuery(B.class, c);
   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>
   is also used as the foreign key attribute.

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

View raw message