dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #11334
Re: [Dhis2-devs] Issue with /api/dataElements after deleting data element from database
Thanks Jason. Yes this was from one of our test scenarios, but we generally
use APIs for all db related operations.
On Mon, Sep 12, 2016 at 4:48 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:
> You must clear the hibernate cache, if you delete a data element directly
> from the database.
>
> http://dhis2.github.io/dhis2-docs/master/en/user/html/
> dataAdmin_cacheStatistics.html
>
> In general, its better to use the API for such operations.
>
> Regards,
> Jason
>
>
> On Mon, Sep 12, 2016 at 1:11 PM, Aamer Mohammed <aamerm@xxxxxxxxxxxxxxxx>
> wrote:
>
>> Hi Morten,
>>
>> We can use /api/dataElements to fetch the list of all data elements in
>> system.
>> [image: Inline image 2]
>>
>> After deleting a data element(say DE1) from database directly and calling
>> the api again, the api is still showing the old list of data elements. We
>> verified this in separate browsers, clearing browser cache and incognito
>> mode of browser. This is same behavior when we check directly from
>> maintenance app as well.
>> [image: Inline image 1]
>>
>> If any new data element(say DE3) is added and the api is called now, the
>> api shows the proper list of data elements.
>> [image: Inline image 3]
>>
>> This is tested on latest version of 2.24. Any thoughts on this issue.
>>
>>
>> Thanks
>> Aamer.
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+46764147049
>
References