@medvejonok79 wrote:
Hello,
I am new to Ember; have got stuck trying to understand the data store behaviour. Other people seemed to have had similar difficulties but I cannot find anything that actually fits my current setup.
using ember-pouch as described in their guide
in my route code, this.get(‘store’).findRecord(‘video’, “id1234”); works fine, it returns the object in the database with id1234.
however, return this.get(‘store’).findAll(‘video’); only returns items which have already been specifically queried by id first. The server couchdb that is being synched to contains about 1000 items, I would like to have these returned by the findAll query.
Similar issue with pouchdb-find:
- the typical queries return empty answers (no records found)
- however in the adapter code, I can get a perfect response (all matching query records) by asking pouchdb-find directly, once an index has been setup, for example with: db.find({selector: { type: ‘myTargetVideoType’}}); this line works great first time. The data store does not.
So… It looks as though the “db” element does everything I want it to do very easily, send back all the records, give back everything I query for, but the this.get(‘store’) just keeps on sending back empty records and ignoring what is already in the database.
Sounds like there is a simple solution to this, but what is it?
Thanks in advance if anyone can give guidance!
RJ
Posts: 1
Participants: 1