Hi

There was an article on Bean Managed Persistence and Dependent objects on 
www.theserverside.com. See if that is helpful. The web link is as follows:

http://www.theserverside.com/patterns/depbmp.jsp.

Hope this helps.
Regards,
C.P.Krishnan

You wrote:
> I agree with Thomas that dependent objects cannot be created/removed
> explicitly. But couldn't we allow reading and updating to those objects?
> Would be a nice feature to have?
> Heng Sin, how do I find out more about the method you suggested? ie, realted
> objects and autostore? Can you give me a simple example?
> Keith
> -----Original Message-----
> From: Low Heng Sin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 30 July 2001 3:15 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] "depends" problem
> Alternatively, u can use related object and set autostore to true. This will
> enable auto create/update of detail object ( it wouldn't handle cascade
> delete though ).
> Regards,
> Low Heng Sin ( [EMAIL PROTECTED] )
> -----Original Message-----
> From: Keith Chew [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 10:25
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] "depends" problem
> Hi Thomas
> Thanks for the quick response. OK, how would you suggest I solve this
> scenario:
> I have 2 tables: Person and Address.
> For every person, they are associated with an address. Loading persons would
> be ok. What if I now want to list all the addresses in the Address table? I
> have to traverse the person's table and extract the address?
> Keith
> -----Original Message-----
> From: Thomas Yip [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 30 July 2001 1:30 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] "depends" problem
> Dependent object cannot be created/removed explicitly. It's created
> automatically when it is added to a master object, and removed automatically
> when it de-linked/dereferenced from a master object.
> Otherwise, we will be run into problem likes a dependent object created
> explicitly but removed implicitly (delinked from a master object), or vice
> versa, and other problems that is harder to detect.
> Thomas
> -----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Sunday, July 29, 2001 4:55 PM
> >To: [EMAIL PROTECTED]
> >Subject: [castor-dev] "depends" problem
> >
> >Hi
> >
> >I have created 2 objects: A and B.
> >
> >The mapping is very simple, A has a collection of B. In the mappings fil, B
> is
> >setup to have:
> >
> >  <class name="B" identity="id" depends="A" >
> >    ...
> >  </class>
> >
> >Now, each time I create A, B is created. Great!! Loading A also works, the
> >objects are retrieved correctly.
> >
> >The problem is when I try to load B, I get a no mapping error:
> >
> >"Unable to extract entity from database: The class B is not persistence
> >capable: no mapping was defined for the class"
> >
> >To fix this problem, all I need to do is to remove the "depends" on A.
> However,
> >removing this makes it difficult to do updates/creates on A.
> >
> >Can you please assist?
> >Keith
> >
> >-----------------------------------------------------------
> >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
> -----------------------------------------------------------
> 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
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

--
---------------------------
C.P.Krishnan
4855 Atherton Ave, STE 201
San Jose, CA, 95130
Ph:(408)376-2923
E-mail:[EMAIL PROTECTED]
---------------------------

Reply via email to