Update of settings by Eloquent doesn't insert new values or delete rows with new values #10562
Labels
Bug:3:Critical
A bug that prevents a substantial minority of users from using the software.
Milestone
Describe the bug
The current implementation of the update statement in the extended Eloquent isn't suitable for the settings data model. Considering the example:
It doesn't allow to remove null values of already existing settings. Considering the example, if we already have a database record:
Then, trying to update with
won't remove the title in English:
update - The EntityDAO behaviour is to remove values explicitly set to
null
, e.g.Also, we need to insert new settings during update.
We have two places in the code, where the logic is implemented:
pkp-lib/classes/db/DAO.php
Line 432 in b4bb499
pkp-lib/classes/core/EntityDAO.php
Line 190 in b4bb499
@touhidurabir's proposal: https://github.com/pkp/pkp-lib/pull/10324/files#diff-4dcc09fe73d537128c17c4bbb260ad4ba24ccc0ecb8cdc7d0b47ebc7986e2cedR79-R129
What application are you using?
OJS, OMP or OPS main branch
The text was updated successfully, but these errors were encountered: