Hi Thomas,
  I am not familiar with ODMG but I will go to study
it. One question needs your help, is it meant that in
the mapping file for this DListImpl I do not need to
configure the attribute element-class-ref for
collection-descriptor tag?
  
Regards,
Rice

--- Mahler Thomas <[EMAIL PROTECTED]> wrote:
> Hello Rice,
> 
> 
> > Hi,
> >   I have been using OJB for some period. I am
> taking a
> > project left by a partner that uses Hinbernate for
> > persistence. So I start studying Hibernate.
> Hibernate
> > has a mapping function called "any type mapping"
> that
> > is defined as the follows:
> > 
> > "The <any> mapping element defines a polymorphic
> > association to classes from multiple tables. This
> type
> > of mapping always requires more than one column.
> The
> > first column holds the type of the associated
> entity.
> > The remaining columns hold the identifier. It is
> > impossible to specify a foreign key constraint for
> > this kind of association, so this is most
> certainly
> > not meant as the usual way of mapping
> (polymorphic)
> > associations."
> > 
> > This kind of mapping is quite useful when dealing
> with
> > fields of java.lang.Object or interface. However,
> as I
> > know, there is no such support in OJB. 
> 
> That's not true!
> OJB allows to build completely polymorphic mappings.
> Just have a look at the 
> o.a.ojb.odmg.collections.DListImpl class.
> It is a list implementation that can hold elements
> of arbitrary persistent
> classes.
> 
> The trick is that we store serialized Identity
> objects as "pointers" to the
> actual objects.
> If you look at the DListImpl code you will see how
> easy it is.
> 
> cheers,
> Thomas
> 
> 
> > I try to study
> > the source code of OJB, but am still not able to
> > figure out the way to modify it (The xml mapping
> > handling code is a little hard to understand, just
> > wonder if it is possible to re-write it with Jibx
> to
> > make it more concise). 
> > 
> > Regards,
> > Rice
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Exclusive Video Premiere - Britney Spears
> > http://launch.yahoo.com/promos/britneyspears/
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to