Hi,
We're pretty new to LLBLGEN and wondering about best practices when it comes to updating many tables that have realtionships.
For instance, we have an "event" table containg sports, concerts, etc. and a "price_spec" table determining a category of prices (say "children", "adults",etc.), the finally a "price" table holding the prices, valid time periodes, etc.
[event] - (1:n) - [price_spec] - (1:n) - [price]
At first glance it looks as if for each "level" we have to find the event (based on an id), then get the collection of price_specs, and for each item in this collection, get the price-collection, and then update each item in the collections on all levels.
Specifically, for an update on the "two lower levels" we have to traverse a collection of "Old prices", delete the ones that does not exist in the "new price collection". Then traverse the new collection and add the ones that do not exist in the Old collection. Alternatively delete the old collection and add the new one, but would it be optimal?
Then if a price_spec is cut, checking whether to delete this and the prices belonging to it.
This generates a lot of code and we're wondering what's the best way to handle all this updating. Any thoughts, tutorials og examples on this one?
Thanks a lot for your time and help,
Rune