the collection (list) view fetches a sparse array (not all model fields) and builds a collection of models using name and id only. beginning with
collection.fetch(); //fetch requesting only partial json fields
The collection fetch calls collection.parse and the respective model.parse()
for each model in the collection.
all is good there.
then a re-fetch -- on one of models within the collection -- is performed for a single model view. this time requesting all fields . name, title, description, etc.
model.fetch({success: function(view) {console.log("yeah");}); //fetch requesting all json fields
the backend rest server shows the request and the provided response.
console shows "yeah". In other words, the model fetch is achieved by all measures.however, this time model.parse
is not called. therefore the new fields are not available.
any hints at to why model.parse
is not called despite the Ajax "success"
further, the backbone done
handler shows the correct json in responses.text
// Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
Have you faced similar issue: fetch with established model id, fetch on model has to return json in object {} not array [{}]. etc.. no best practices thnx