I use the following in my orion-ejb file that persists a list of 'dns records'

                        <cmp-field-mapping name="dnsRecords">
                                <list-mapping table="dnsrecord">
                                        <primkey-mapping>
                                                <cmp-field-mapping name="domain_id" 
persistence-name="domain_id" />
                                        </primkey-mapping>
                                        <value-mapping type="blah.DNSRecord">
                                                <cmp-field-mapping>
                                                        <fields>
                                                                <cmp-field-mapping 
name="_class" persistence-name="class" />
                                                        </fields>
                                                </cmp-field-mapping>
                                        </value-mapping>
                                </list-mapping>
                        </cmp-field-mapping>

On Thu, Nov 23, 2000 at 08:50:32AM +0100, Giorgio Angiolini wrote:
> Thanks for the response !
> 
> Does anyone have some examples  of ejb-jar.xml with one entity bean with
> collections of entity beans ?
> Thanks.
> 
> Giorgio
> 
> 
> 
> Mike Cannon-Brookes ha scritto:
> 
> > just use it as you would any other collection. Orion is smart enough to
> > persist the primary keys of each entity in the relation.
> >
> > -mike
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Giorgio
> > > Angiolini
> > > Sent: Wednesday, November 22, 2000 7:48 PM
> > > To: Orion-Interest
> > > Subject: Collection of entity beans
> > >
> > >
> > > Repost for mail server problem (sorry !)
> > > Hello
> > > I have just read the nice  article "Advanced Object-relational mapping"
> > > found in orionsupport.com (thank's Joe Walnes !).
> > >
> > > The following types of field can be mapped within entity beans:
> > > 1) Simple object and primitives
> > >
> > > 2) Object
> > >
> > > 3) Serializable objects (A.K.A BLOB)
> > >
> > > 4) Entity references
> > >
> > > 5) Collection
> > >
> > > One question: how can I use the container managed persistence with
> > > collection of entity references ?
> > >
> > > Thank's a lot !
> > >
> > > Giorgio
> > >
> > >
> > >
> > >
> > >
> > >
> 
> 

Reply via email to