Hi, Recntly I faced with weird behavior in Setting manager. When I call
SettingManager.ChangeSettingForTenantAsync(tenantId, name, value);
my setting will be deleted from AbpSetttings. I check sqlserver profiler and find this code:
exec sp_executesql N'DELETE [dbo].[AbpSettings]
WHERE ([Id] = @0)',N'@0 bigint',@0=112
WHY?
2 Answer(s)
-
0
found. When setting value is equal to default value (initialized in SettingProvider) abp delete related row from abpSettings entity. I think this is a bad thing?! suppose that user set setting value to default value , related row will be deleted from abpSettings entity, now we release new version and seed method execute . the final conclusion is that "<ins>Seed method create new row in AbpSettings that maybe have a diffrente value compare with those user value</ins>" .
-
0
Hi,
You can set isInherited for your setting if you don't want that behaviour. See <a class="postlink" href="https://www.aspnetboilerplate.com/Pages/Documents/Setting-Management">https://www.aspnetboilerplate.com/Pages ... Management</a>.