|
⇤ ← Revision 1 as of 2005-03-22 05:43:34
Size: 737
Comment: missing edit-log entry for this revision
|
← Revision 2 as of 2009-09-20 22:56:17 ⇥
Size: 737
Comment: converted to 1.6 markup
|
| No differences found! | |
Q: I am new to OJB. I wonder if OJB has something like Hibernate's component mapping, which makes code structure better and reuse easier.
A: Yes that's possible with OJB too! You have to tell OJB to use a PersistentField 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"
/> }}}