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 Kumar Chandran <Kc...@ctisinc.com> on 2004/08/04 00:56:43 UTC

1:n mapping

Hi,
 
Is it possible to insert both parent and children (1:n) at the same time or
do we have to insert each child record individually after inserting the
parent record.  If this can be done some help is appreciated in this regard
as to how to configure it in repository_user.xml and how to use odmg api to
do this.
 
Thanks,
 
Kumar Chandran
 
This electronic message contains information from CTIS, Inc., which may be
company sensitive, proprietary, privileged or otherwise protected from
disclosure. The information is intended to be used solely by the recipients
named above. If you are not an intended recipient, be aware that any
review,disclosure, copying, distribution or use of this transmission or its
contents is prohibited. If you have received this transmission in error,
please notify us immediately at ITM@ctisinc.com.

Re: 1:n mapping

Posted by Noureddine BEKRAR <nb...@rennes.jouve.fr>.
Hi Kumar,

You can insert the parent and the child together  by setting the
auto-update="true" in the repository_user.xmland if you want to do insert
separately parent and childs you put it to false <class-descriptor
class="parent" table="PARENT">
		<field-descriptor name="id" primarykey="true" autoincrement="true"
column="ID" sequence-name="parentid_seq" jdbc-type="INTEGER"/>
		<field-descriptor name="name" column="NAME" jdbc-type="VARCHAR"/>
		<collection-descriptor name="childs" element-class-ref="Child"
auto-delete="false" auto-update="false">
			<inverse-foreignkey field-ref="parentid"/>
		</collection-descriptor>
</class-descriptor>

----- Original Message ----- 
From: "Kumar Chandran" <Kc...@ctisinc.com>
To: <oj...@db.apache.org>
Sent: Wednesday, August 04, 2004 12:56 AM
Subject: 1:n mapping


> Hi,
>
> Is it possible to insert both parent and children (1:n) at the same time
or
> do we have to insert each child record individually after inserting the
> parent record.  If this can be done some help is appreciated in this
regard
> as to how to configure it in repository_user.xml and how to use odmg api
to
> do this.
>
> Thanks,
>
> Kumar Chandran
>
> This electronic message contains information from CTIS, Inc., which may be
> company sensitive, proprietary, privileged or otherwise protected from
> disclosure. The information is intended to be used solely by the
recipients
> named above. If you are not an intended recipient, be aware that any
> review,disclosure, copying, distribution or use of this transmission or
its
> contents is prohibited. If you have received this transmission in error,
> please notify us immediately at ITM@ctisinc.com.
>


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