You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Lynn Monson <ly...@nextpage.com> on 2003/03/14 03:22:51 UTC
Implementing Single Table Aggregation in OJB
Could anyone tell me how to implement the Single Table Aggregation pattern for a 1:1 relation using OJB? RowReaders seem to solve the problem for reading, but I'm stumped as to how to write to such a table.
The pattern is found here:
http://www.objectarchitects.de/ObjectArchitects/orpatterns/MappingObjects2Tables/SingleTableAggregation/
Any help is *greatly* appreciated.
Re: Implementing Single Table Aggregation in OJB
Posted by Thomas Mahler <th...@web.de>.
Hi Lynn,
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
name="adress->street"
column="ADR_STREET"
jdbc-type="VARCHAR"
/>
cheers,
Thomas
Lynn Monson wrote:
> Could anyone tell me how to implement the Single Table Aggregation pattern for a 1:1 relation using OJB? RowReaders seem to solve the problem for reading, but I'm stumped as to how to write to such a table.
>
> The pattern is found here:
> http://www.objectarchitects.de/ObjectArchitects/orpatterns/MappingObjects2Tables/SingleTableAggregation/
>
> Any help is *greatly* appreciated.
>
Re: Implementing Single Table Aggregation in OJB
Posted by Joerg Lensing <in...@softcon-lensing.de>.
Lynn Monson schrieb:
>Could anyone tell me how to implement the Single Table Aggregation pattern for a 1:1 relation using OJB? RowReaders seem to solve the problem for reading, but I'm stumped as to how to write to such a table.
>
>The pattern is found here:
>http://www.objectarchitects.de/ObjectArchitects/orpatterns/MappingObjects2Tables/SingleTableAggregation/
>
>Any help is *greatly* appreciated.
>
>
>
>
>
Hello Lynn,
can you describe your object-model -respectively the part you want to
use the Single Table Aggregation pattern?
Joerg