lundi 10 avril 2017

queryRecord by filtering an object doesn't work in ember js

self.store.query('user-notif', {
  filter: {
    title: 'Concern',
    n_type: {
      $type: 'disease',
      $name: user.get('tag').prediction[pred_loc].dis
    },
    uid: email
  }
}).then(function(notif) {
  notif.set('notif_message', 'At this age, the probability of you getting ' + user.get('tag').prediction[pred_loc].dis + ' is ' + user.get('tag').prediction[pred_loc].prob);
  notif.save().then(function() {
    console.log('saved');
  });
});

But the query filter doesn't occure I get an error that says:

disease not supported as a type.Please use one of object, string, array, number, boolean or null.




Aucun commentaire:

Enregistrer un commentaire