Hi Thomas, Thank you for your answer. But I continue my question. Is it possible to have this embbeded value to refer back the master object. For example, B (as the Address class) is the embeded object of A (Party class as example). But B has a field referring to A. Is this kind of mapping possible? I konw if A and B are mapped to 2 tables (that is 1-1 relationship), this is easy. But is B is embeded in the table for A. Current mapping mechanism seems not support it yet.
Regards, Rice --- Thomas Mahler <[EMAIL PROTECTED]> wrote: > You have to tell OJB to use a PersistenField > implementation supporting > this in OJB.properties first, as it is not yet > implemented in the > default implementation: > > PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentNestedFieldMaxPerformanceImpl > > if your class has an attribute "address" of type > Adress, > the mapping for the "street" attribute of "address" > would look like follows: > > <field-descriptor id="10" > name="adress->street" > column="ADR_STREET" > jdbc-type="VARCHAR" > /> > > cheers, > Thomas > > Rice Yeh wrote: > > Hi, > > As stated in Martine Flower's artice > > > (http://martinfowler.com/eaaCatalog/embeddedValue.html) > > "Many small objects make sense in an OO system > that > > don't make sense as tables in a database. Examples > > include currency-aware money objects and date > ranges. > > Although the default thinking is to save an object > as > > a table, no sane person would want a table of > money > > values.". In OJB, how these small objects are > mapped > > to the same table of their master object? > > > > Regards, > > Rice > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Tax Center - forms, calculators, tips, more > > http://taxes.yahoo.com/ > > > > > --------------------------------------------------------------------- > > 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!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]