I guess making it bi-directional is a way to solve it, but in some cases it
is not very possible, especially if you have many parents class can share
the same child class. for example, the attachment can be the children of
"product", "message", etc..

Is there a way to specifically inform the parent class that it has been
changed after add a child, and to let it update the cache?

Thanks,
John W

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 7:25 AM
Subject: Re: [castor-dev] Composite Object Caching


> Chris Williams wrote:
> >
> > as far as both our database and mapping.xml is concerned, no.  how would
one
> > make sure the relationship is bi-directional?  i assume you are talking
> > about at the castor level.
> >
> > on 1/8/02 12:52 AM, Thomas Yip at [EMAIL PROTECTED] wrote:
> >
> > >
> > >
> > > Is the relationship a bi-directional relationship.
> > > Otherwise, make sure it is.
>
> Chris,
>
> There are two types of relationships in most object persistence tools,
> uni-directional and bi-directional. A uni-directional relation is one
> which objectA makes reference to objectB, but objectB does not make
> reference to objectA. A bi-directional relation is just the opposite -
> objectA refers to objectB and objectB refers to objectA.
>
> In most situations, Castor requires that relations be mapped as
> bi-directional. To do so, make sure that both sets of objects have
> references to each other. For example, if objectA has a one-to-many
> relation to objectB, objectB must have a many-to-one relation back to
> objectA.
>
> Bruce
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to