I am creating some records locally, with the command
store.createRecord('vdpformat',{recordformat:"a",name:f.name});
Once they are created, I try to get the records which have the value of recordformat=a using the following code.
var totalvdpformats=store.all("vdpformat");
var filteredRecords=totalvdpformats.filterBy("recordformat","a");
But I get the contents of filtered records as empty as the promise doesn't get resolved.It returns an empty array when I try to console log filteredRecords.
Is there anyway to use a promise on the above?
When I try to add a promise on totalvdpformats, it tells me the function is undefined.
Please help.
Aucun commentaire:
Enregistrer un commentaire