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 gf...@fys.com.ar on 2003/12/11 17:44:18 UTC

Inheritance and m:n help needed

Hi all,

Some ignorance here. We need your help.
In our problem it seems both inheritance and m:n mappings are part of the 
solution but we do not see a clear implementation picture using OJB

Let´s say  Investors are "risking" their money in 1 or * Investments . An 
Investment is shared by 1 or * Investors. 
It´s a m:n association between Investment class and Investor class.
In our model, an Investor can be either a Person class or an Inc 
(llc/Inc/enterprise/bank etc.) class.We are thinking in an  inheritance 
model where Person class and Inc class extend Investor (either Person and 
Inc have common and different attributes and methods).

Since we are designing this from scratch there are no "legacy" 
restrictions.
>From the domain model there are no restrictions; the Investor class could 
be an abstract or concrete class. There are also no database restrictions, 
we can build a model with distinct, same o joined tables for the 
inheritance and manual decomposition for the m:n association problem. On 
the implementation side, we are pretty familiar with the PB api, no odmg 
or jdo experiece yet.

Any help (uml, java, mappings, whatever) would be appreciate!

Regards,
Gustavo Faerman