Michael Boyle wrote:
> Suppose we have a coarse-grained Order entity bean which manages
> multiple non-bean Items, based on an RDB with Order and Item tables.
[...]
> 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!
Okay, I'm going to do something a little different, here ... I'm going to
compliment TOPLink.
When you save an object in TOPLink (tell it to commit an object to the
database), TOPLink will do the minimum SQL necessary to update the database.
If you only add one item to your Order, TOPLink will only generate the
necessary SQL to create the item with a back reference to the Order.
It's a very nice feature, that should keep you from having to worry about
things like you mention in most cases.
Does anyone know if this is a common feature of O/R tools?
===========================================================================
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".