When to create children in CMR relationship
"Linus Nikander" <[email protected]> Thu, 19 Feb 2004 12:34:51 +0100
| Newsgroups | gmane.comp.java.javagroups.general,gmane.comp.java.ejb.general,gmane.comp.java.javagroups.devel,gmane.comp.java.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] ------------------------------------------------------- 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