Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findall and filter result discrepancy #531

Open
yaoyao-ict opened this issue Dec 18, 2018 · 6 comments
Open

findall and filter result discrepancy #531

yaoyao-ict opened this issue Dec 18, 2018 · 6 comments

Comments

@yaoyao-ict
Copy link

In a custom adapter with default cacheResponse: true, if we create some data.

Then call filter() can get the data that include newly created things.
But call findAll() again will get out-of-date data.
Why do we have this discrepancy here? if we can remember the all the difference, is it better to make findAll's result up-to-date?

@crobinson42
Copy link
Member

@yaoyao-ict the issue template and questions are there for a reason - when you bypass them and don't answer questions like, "what version you're using", I'm forced to follow up with questions about "what version are you using" :-)

Please provide an example of what you're experiencing so we can resolve if it actually an issue. (I do not experience this nor are any tests failing with custom adapters.)

Try reproducing with a Runkit: https://runkit.com/crobinson42/github-com-js-data-js-data-issues-501

@kvandelden
Copy link
Contributor

If you are using the Store, change the onConflict property to keep. This will prevent data from being merged or replaced by the original data.

@yaoyao-ict
Copy link
Author

Sorry for missing the version info in my questions. we are still using 2.10.1 as 3.xx introduced some breaking change.
Not sure if you are still maintaining the 2.xx version or not.

@yaoyao-ict
Copy link
Author

@kvandelden
My case is not about how to merge on conflict. I created new items, but findAll() does not respect the change. My understanding is if we have any write operation, any cached response should be dropped.

@kvandelden
Copy link
Contributor

getAll operates locally against the container in v3.. v2?

image

I suspect findAll isn't intended to operate the way your expecting.

@crobinson42
Copy link
Member

@yaoyao-ict v2 is not maintained but we will review and merge PR's from the community 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants