I now have many different chunks of code which update 1-n relationships based on new input... I'll use a simple example just to make the language easier...
I show the user the 5 authors they've assigned to a book... they remove two authors and add one.
I now have a list of 4 authors sent to my processing code... I pretty much always wipe the original 5, and then rewrite the 4.
It just seemed the most reasonable and error proof way to approach the issue... but it occurred to me this is such a common task that there's a chance there's either a standard or a more economical way to do this with SQL.
This applies to a handful of different databases and languages, so I'm really thinking of it in the most general sense.
Thanks,
Rob
I show the user the 5 authors they've assigned to a book... they remove two authors and add one.
I now have a list of 4 authors sent to my processing code... I pretty much always wipe the original 5, and then rewrite the 4.
It just seemed the most reasonable and error proof way to approach the issue... but it occurred to me this is such a common task that there's a chance there's either a standard or a more economical way to do this with SQL.
This applies to a handful of different databases and languages, so I'm really thinking of it in the most general sense.
Thanks,
Rob