Open criske opened 3 years ago
@criske thank you for reporting this. I'll assign someone to take care of it soon.
@amihaiemil now that I think about it, I think this should be done by JsonStorage implementation - both before storing and getting:
For example if we query for Json#getResource(/foo/bar?b=true&a=100)
, it should order internally and then query for resource..
Edit --
or in JsonResources
, just to keep the logic in self-core. :D
@amihaiemil I couldn't find any assignee for this task. This is either because there are no contributors with role DEV
available or because the project does not have enough funds.
Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.
@criske It's a valid issue, but as you said in Prod we will never face it. Github and GitLab URIs do not use query parameters at all (maybe just per_page). So I think it's virtually a useless fix: more complicated code for nothing : D
@amihaiemil I couldn't find any assignee for this task. This is either because there are no contributors with role DEV
available or because the project does not have enough funds.
Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.
Having two URI's
/foo/bar?a=100&b=true
and/foo/bar?b=true&a=100
Eventhough these URIs have query parameters in different order, they are pointing to the same
Resource
. And this will lead to duplicate entries inJsonStorage
- will be treated as different primary key.Proposal: order URI query parameters by 'name' in alphabetical oder before storing
CachedResource
intoJsonStorage
.Ex:
/foo/bar?b=true&a=100
will be/foo/bar?a=100&b=true
before storing.