Apologies for the unclear topic.
I have a recipe database, where I have tables for
• recipe-ingredient junction, where I store data of e.g. amounts in recipes
I just realised i will need to easily make different versions of basically the same recipe where the new recipe version has slightly varying ingredients. Say a “Cheeseburger with fries v1” record where the bread ingredient is white bread of brand A, then a “Cheeseburger with fries v2” with white bread brand B as one ingredients. Otherwise same instructions and ingredients.
Perfect workflow for my users here would be to take the “Cheeseburger with fries v1” record in the recipe table, right-click -> duplicate record, get a new record with all the ingredients ready there, which they can start editing.
BUT! When simply duplicating the recipe record, the duplicate record, of course, has links to the same ingredients in the junction table as v1 has (the same ingredients now link to both v1 and v2). Editing these will affect the ingredients in “Hamburgers with fries v1” too, not nice. This is standard purpose basic behavior but not purposeful in my case. So,
Is there a way to do this: When duplicating a record in one table (here recipes) --> duplicate all records that are linked in one of its fields (here recipe-ingredient junction records), and make duplicates of all these in the junction table, so that the duplicate record in the recipe table has links to newly duplicate records of the ingredients in the recipe-ingredients table??