db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TINE Houari (OBJECTIVA)" <houari.t...@ca-cedicam.fr>
Subject RE: what is the plan for mapping classes on multiple joined tables
Date Mon, 24 Feb 2003 08:47:25 GMT

Hi,

I have modied the source of OJB to enable mapping 1:1 and 1:m association
without adding variable instance (that model fk) in business object. I also
adding the possiblity to allow automatically inheriance without any effort.
For later, the idea is to model extended classes as 1:1 association with
blank name.

Actually, this changes work fine for loading. For updating and deleting,
tests are under way.

Houari TINE.

 -----Message d'origine-----
De : 	Clóvis Wichoski [mailto:clovis_wichoski@uol.com.br] 
Envoyé :	vendredi 21 février 2003 23:05
À :	OJB Developers List
Objet :	Re: what is the plan for mapping classes on multiple joined tables

Hi Thomas,

Thanks for ideas, and I agree with you about item 2.

 > 2. You could patch OJB to do provide this kind of inheritance mapping 
automatically. Of course your contribution would be most welcome :-)

Because I'm new in OJB, any tip or a start point to follow?

Best regard's

Clóvis


Thomas Mahler wrote:

> 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
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>



---------------------------------------------------------------------
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