My model looks like that:
var Item = Backbone.Model.extend({
urlRoot: '/item/ajax_get'
});
If I want to get a specific item from the database, I can do: item = new Item({id: 11});
But what if I don't know the id
of the item that I want to fetch? Instead, I want to query the database (via AJAX) to get the most recent item
sorted by timestamp
. Is this possible with Backbone.js?