Workout-Tracker
Workout-Tracker copied to clipboard
Improve database import
If a row has been removed from one of the tables all of the relations will be wrong, since the primary key gets incremented for each added entity. Removing no32 would mean that 33->32 in that table, while all other tables are unaware of this change.
Inserting entity returns it's key, use this key to update references to the old key in other tables where applicable.