db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: what is the plan for mapping classes on multiple joined tables
Date Fri, 21 Feb 2003 21:12:49 GMT
Hi Clóvis,

Clóvis Wichoski wrote:
 > Hi, OJB team,
 >
 > I'm using Castor today, but because they don't support polymorphism,
 > I'm analysing the change to OJB. In Castor I'm using multiple joined
 > tables, today, if I need to get a subclass, in master class I put a
 > field called subclass to identify the subclass via mnemonic symbol.
 > and reload by oid using subclass.

That's the same idea as with our ojbConcreteClass (see tutorial3.html).

 > Since OJB control the polymorphism
 > there are no problem, but the DB schema is, then What is the plan for
 > mapping classes on multiple joined tables? If don't has a plan where
 > I can start to make this work?

You are right mapping a single class to joined tables is not support 
automatically.
There has been no real demand for this feature so far, hence we have 
been a bit lazy here...

I see two options:
1. as a workaround you could use helper classes that map on each of the 
joined tables and connect them with simple 1:1 references.
Your "real" business class would then be a wrapper to those helper classes.
2. You could patch OJB to do provide this kind of inheritance mapping 
automatically. Of course your contribution would be most welcome :-)

cheers,
Thomas

 >
 > TIA
 >
 > Clóvis
 >
 >
 > ---------------------------------------------------------------------
 >  To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For
 > additional commands, e-mail: ojb-dev-help@db.apache.org
 >
 >



Mime
View raw message