Tom,

Unfortunately the current spec doesn't provide a standard way for EJB
servers to handle dependent objects in CMP. This is the reason I don't
recommend CMP at this time. I don't see an advantage of having CMP handle
the tip of my object graph, but not the leaf nodes...

Probably the best way to handle this is to use an OR mapping product that
automates this issue. Cocobase from Thought Inc. will do this for BMP beans
automatically (they are also releasing CMP support, but I don't know how it
handles this issue). Other OR mapping products will probably do this too.

We have a light weight persistence service that will be part of example code
that we are releasing to industry very shortly. This will show an example of
how to achieve OR mapped object persistence without hand coding SQL in you
domain objects. Look for this early in the new year.

Regards,

-Chris.

> -----Original Message-----
> From: Tom Jordan [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, December 09, 1999 10:54 PM
> To:   [EMAIL PROTECTED]
> Subject:      Persisting Dependant Data
>
> Hi,
>
> I was hoping i could get some suggestions from people on how to best
> handle
> the issue of persisting data. For discussion purposes, lets use Order and
> Order line items.  I have modeled Order as a CMP based entity bean.  From
> previous posts in the archives I gather that dependant data should not be
> modeled as entity beans.  In which what is the suggested design for
> persisting and loading the line items. What i have been doing thus far is
> adding the persistence code to the entity bean and let it control the
> dependant object. Is this the right way of doing things?
>
> The thing that i don't like about that approach is that the Order bean has
> the flexibility of having its data source changed without impact to the
> component. If the component now contains hand coded persistance code, it
> then become unportable.  I would be very keen on knowing how is the best
> way
> to approach this common problem.
>
> thanks in advance.
> Tom
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to