You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
Duplicate entries of relations are created, when the parent entity is being updated.
Scenario: The app fetches data from an API & stores it in a table, this is the model:
Tour {
List(Place) places;
…
}
Step 1: App fetches data, like fetchAllTours()
Step 2: A tour is added on API side, i.e. all existing tours stay the same --> fetchAllTours()
All the existing tours get updated in the DB now, but each time a new row in the pivot table ("TOUR_PLACE") is being created. Resulting in duplicates: Getting one of the already existing Tours from the DB will now have each place twice.
The text was updated successfully, but these errors were encountered:
I have the same problem
Setting @Id on the ID field i get from Json, seems to override the ID from the server by an autogenerated ID.
It therefores creates duplicates.
Duplicate entries of relations are created, when the parent entity is being updated.
Scenario: The app fetches data from an API & stores it in a table, this is the model:
Tour {
List(Place) places;
…
}
Step 1: App fetches data, like fetchAllTours()
Step 2: A tour is added on API side, i.e. all existing tours stay the same --> fetchAllTours()
All the existing tours get updated in the DB now, but each time a new row in the pivot table ("TOUR_PLACE") is being created. Resulting in duplicates: Getting one of the already existing Tours from the DB will now have each place twice.
The text was updated successfully, but these errors were encountered: