abp icon indicating copy to clipboard operation
abp copied to clipboard

SettingManagementStore don`t read settings in 3.1 version

Open EugeniZaplatin opened this issue 6 years ago • 12 comments

When I used version 2.6, whith ISettingManagementStore I can Set()/Get() settings from Db. But, when go to version 3.1, ISettingManagementStore only execute Set() correctly, but don`t Get() Insted of it, I have to use ISettingRepository.

Who can explain this situation?

EugeniZaplatin avatar Sep 28 '20 19:09 EugeniZaplatin

  • Steps needed to reproduce the problem.

realLiangshiwei avatar Sep 29 '20 01:09 realLiangshiwei

  1. Inject ISettingManagementStore
  2. SetAsync() any setting
  3. Try GetAsync() it

My experience - GetAsync() return NULL

EugeniZaplatin avatar Sep 29 '20 01:09 EugeniZaplatin

It works fine. image

realLiangshiwei avatar Sep 29 '20 01:09 realLiangshiwei

image my real experience don`t good

EugeniZaplatin avatar Sep 29 '20 03:09 EugeniZaplatin

Please use the startup template to reproduce this problem.

realLiangshiwei avatar Sep 29 '20 05:09 realLiangshiwei

What do you mean by "startup template"

EugeniZaplatin avatar Sep 29 '20 10:09 EugeniZaplatin

https://docs.abp.io/en/abp/latest/Startup-Templates/Application

realLiangshiwei avatar Sep 29 '20 10:09 realLiangshiwei

Hi @EugeniZaplatin I have had same issue . I defined default setting value in custom definition provider class as below . then i called SetAsync method in ISettingManagementStore and changed default setting value. After this process i called GetOrNullAsync method and read value as below

setting

result

obassullu avatar Sep 29 '20 21:09 obassullu

@obassullu I can't see the problem in your code, unchecked is the expected value

image

realLiangshiwei avatar Sep 30 '20 06:09 realLiangshiwei

hi @realLiangshiwei
If there is no custom definition provider class such as NotificationSettingDefinitionProvider, the result is null. abp version 3.1.2

settingresult

settingdb

no problem in abp version 2.9.0

obassullu avatar Sep 30 '20 20:09 obassullu

Please use the startup template to reproduce this problem.

realLiangshiwei avatar Oct 01 '20 01:10 realLiangshiwei

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 30 '20 01:11 stale[bot]