A couple of quibbles.
-
I would use
orders
as the name of the variable with the response data:order.get("firstObject")
is weird to read. Expanding on that, if sequence numbers serve as ids in your app, I think there is a way to set that up as primary key with ember-data. That would make more clearer.
I would probably put everything inside the resolved branch (so inside the then(function(order) { ... })
, otherwise some changes that the code outside it cause might happen before what’s inside and that’s probably not what you want.
Quoting the Ember Doctor proposal: