Why does template auto-update with findAll() but not findQuery()?


#1

I use this in the template:

<ul>
  {{#each messages}}
  <li>{{name}}: {{content}}</li>
  {{/each}}
</ul>

And it will auto-update with a model in the Router set via findAll:

model: function (params) {
    return Ember.RSVP.hash({
      messages: this.store.findAll('message'), 
    });
  },

However, if I use findQuery (which I really must do) it will render the first time, but not auto-update:

model: function (params) {
    return Ember.RSVP.hash({
      messages: this.store.findQuery('message', {room_id:1}),
    });
  },

Any idea what’s wrong?


#2

Nevermind, I learnt that queries do not provide live record arrays.


#3

But how did you get around it.