Orphan entries creation using the /statique/{id_pdc_itinerance}
PUT endpoint (update)
#40
Labels
/statique/{id_pdc_itinerance}
PUT endpoint (update)
#40
Purpose
When updating a
Statique
entry, we manipulate multiple database tables. Some of those tables have no unicity criterion that allows us to update aPointDeCharge
-related entry, but instead creates a new entry, leaving the former entry possibly orphan, i.e. not linked to anyPointDeCharge
.Example: if we update the
contact_amenageur
field of aStatique
entry, we will create a new entry for theAmenageur
table and link this entry to the updatedPointDeCharge
. The originalAmenageur
entry won't be linked to thisPointDeCharge
, making it (possibly) orphan.Proposal
Maybe we should be more granular and allow to update all statique-related entries (database tables) using a dedicated endpoint per object:
PUT /statique/amenageur/{amenageur_id}
.An alternative - temporary - solution may be to clean orphan entries regularly to avoid database pollution.
The text was updated successfully, but these errors were encountered: