Closed Nelly-Barret closed 3 weeks ago
See my comment here: https://github.com/Nelly-Barret/BETTER-fairificator/issues/3#issuecomment-2140261925
We can either replace the existing tuple with the given one, or do nothing (i.e., simply add new Resource isntances and do nothing for the already existing ones).
This may be dangerous to update the existing tuples because one cannot be sure that what is in the database reflects the content of the instance in the code. To be seen.
With upsert, one can specify wether to:
$setOnInsert
);$set
).This is implemented at 5e3c39a789f20e6c7e3ef71bf0ccac2ce80ee2f5 through the Enum UpdatePolicy.
See what has been described for ExminationRecord instances in https://github.com/Nelly-Barret/BETTER-fairificator/issues/3.
We may have to choose between (i)update the vlaue with the new one, (ii) keep the old value