Discussion:
When to create children in CMR relationship
Linus Nikander
2004-02-19 11:34:51 UTC
Permalink
I've been toying around with a small CMR 1:N (Unidirectional, not that I can
see that mattering) example at home. The one thing I can't find any
informtion on is WHEN to create the child objects.

What is the recommended (allowed) parctice for creating the children to a
parent in a 1:N relationship. Do I:

- Create a business-method in the parent which in turn creates child
objects, say createChildren(..) for instance ?
- Manually create the children by using their own ejbCreate-methods (i.e not
using the parent at all)
- Somehow expose the childrens ejbCreate through the parent (if so how ?)
- Use some other approach alltogether (if so how) ?

//Linus Nikander ***@nikander.net






-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

Loading...