You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Mahler <th...@web.de> on 2003/12/03 08:21:22 UTC

[Fwd: How collection data stored in db]


-------- Original Message --------
Subject: How collection data stored in db
Date: Tue, 2 Dec 2003 20:33:22 +0100 (MET)
From: Damir Dulitz <de...@gmx.net>
To: ojb-user-owner@db.apache.org

In the ojb tutorial (http://db.apache.org/ojb/tutorial3.html) there is
example for a 1:n mapping.
But how and where are the collection information stored in the database? If
I have a java class (named "Team") with "name" and "members" as properties;
and "members" is a collection if "person".
The corresponding repository.xml looks like:
   <class-descriptor class="objectmodel.Team" table="team">
     <field-descriptor name="id" column="id" jdbc-type="INTEGER"
primarykey="true"/>
     <field-descriptor name="name" column="name" jdbc-type="VARCHAR"
nullable="false"/>
     <collection-descriptor name="members"
element-class-ref="objectmodel.Person">
       <inverse-foreignkey field-ref="id"/>
     </collection-descriptor>
   </class-descriptor>
   <class-descriptor class="objectmodel.Person" table="person">
     <field-descriptor name="id" column="id" jdbc-type="INTEGER"
primarykey="true"/>
     <field-descriptor name="name" column="name" jdbc-type="VARCHAR"/>
   <class-descriptor/>

Are the "members" data (which persons are within the collection) stored in
the db? If so, where and how?

A little bit confused ...

D. D.

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net






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