Suppose we have a coarse-grained Order entity bean which manages
multiple non-bean Items, based on an RDB with Order and Item tables.
If we're using bean-managed persistence, then in Order's ejbStore()
method, I have to save all the Items to the DB. But since the
most recent operation on my Order bean may have changed the list
of the Order's items arbitrarily (added some, deleted some), what
I really have to do is:
- delete all Items in the DB corresponding to the Order
- insert all the new Items
This seems a bit inefficient if just a single Item has been
added or deleted!
Am I missing something?
Are there any patterns that work better here?
Do the OR mapping tools handle this case automatically?
In a case like this, can container-managed persistence be:
a) always used?
b) never used?
c) used with some bean containers but not others?
d) used with some databases but not others?
e) always used with OODBs?
Any definitive answers to these questions would
indubitably diminish my bafflement.
Thanks, Michael
===========================================================================
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".