hello Thomas,
  Is there documentation about using DListImpl to
support polymorphic? Or this feature just works in
odmg api? how about other api?

  By the way, one feature in Hinbernate impress me is
that it has a type called "class" to store the field's
class as string (java.lang.getClass()). Only with a
feild's class stored in a row, it is possible to
implement ploymorphic. With serializable object stored
as binary, much informatin is lost for doing query
(for example, I just want query elements with some
specific class in a containing object). Am I right?

  Another issue I met in mapping is when using nested
field I must force my code to declare intermediate
fields as concrete class, for example,
InterfaceImpleClass instead of Interface. Otherwise,
an error will happen when retrieving object from
database. I search the mail list archive, Rice had
posted a solution. But I still have this problem in
rc4.

  Finally, I must say 'thank you' to all of you to
provide OJB. I like it (though I seem raising too many
mapping problems). I have used other commercial JDO
compatiable products and I found they also have
similar mapping problems. For OJB, it does quite good
in OR mapping. For Hibernate, I do not like it much
because it force me to wirte many setXXX methods for
properties that should be read-only. For OJB, its
instrumenation to object models is not much since the
introduction of anonymous fields.

cheers
Archie


hello Rice,
  Could you mail me the solution to the problem I
mentioned in the above?

thank you
Archie

> > 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.   




--- Rice Yeh <[EMAIL PROTECTED]> 的訊息:> 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]
>  

-----------------------------------------------------------------
每天都 Yahoo!奇摩
海的顏色、風的氣息、愛你的溫度,盡在信紙底圖
http://tw.promo.yahoo.com/mail_premium/stationery.html

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

Reply via email to