Re: Clean Object Class Design -- What is it?

From: bok <bok_at_free.net.nz>
Date: Sat, 28 Jul 2001 20:51:11 +1200
Message-ID: <3b627c42_at_clear.net.nz>


> of course you can easily create and use an in-between class for
> bidirectional navigation (single-value or multi-valued). In Java this
 would
> just usually require quite a lot of casting.

An 'in-between' class shouldn't be necessary to model a 1 to many relationship or even an m-n for that matter. However, sometimes it is useful to introduce a link class to model an association esp. m-n when the 'association' has attributes and behaviour.

> You could also define member attributes on all the involved classes for
> bidirectional links. An additional link factory class might maintain these
> links automatically.

You might have to do something like that if the "object manager" or DBMS didn't maintain the relationship for you.

>
> What I meant was a little different:
> Given the commonly used construct "parent.child", is there a language that
> allows getting the parent from the child?

I must be missing something here. What's wrong with child.parent? Received on Sat Jul 28 2001 - 10:51:11 CEST

Original text of this message