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

Querying Adding Record to Ember Data #182

Open
bartam opened this issue Jun 9, 2017 · 4 comments
Open

Querying Adding Record to Ember Data #182

bartam opened this issue Jun 9, 2017 · 4 comments

Comments

@bartam
Copy link

bartam commented Jun 9, 2017

I'm going nuts trying to debug this.

When I do a this.store.query('model',{filter: filter}) , it will add a record to my model. However, if I rerun the query inside the session, it won't add a record. These records aren't saved, but somewhere, it's doing a store.createRecord('model',filter). Running with debug messages, it shows the correct record count, however.

So if I did a store.findAll('model') which returned 1. Then ran a store.query..., findAll would return 2. Running the store.query... again, findAll would return 2 still. If I reloaded the page, findAll would return 1 again, as it should.

I'm thinking I'm missing a critical concept of couchDB/pouchDB.

@broerse
Copy link
Collaborator

broerse commented Jun 10, 2017

Not sure it is related to emberjs/data#4463 but try what happens if you set coalesceFindRequests: false, in your adapter.

@bartam
Copy link
Author

bartam commented Jun 10, 2017

No change.

@broerse
Copy link
Collaborator

broerse commented Jun 14, 2017

In version 4.2.6 released today we Fixed a queryRecord deprecation. It does not seem to be related to this issue but just to be sure update to this version. Perhaps we need to setup a https://ember-twiddle.com/ to see this issue.

@akatov
Copy link
Contributor

akatov commented Jul 4, 2017

ember-twiddle doesn't let you access indexeddb. So ideally one would want access to the pouch memory adapter as an ember addon for this...

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

No branches or pull requests

3 participants