function loadData(state, payload) {
	  var entity = payload.model.entity;
	  var data = payload.result;

	  if (!data) {
	    // no-op if no real data was returned
	    return state;
	  }

	  if (!_.isArray(data)) {
	    data = [data];
	  }

	  return state.withMutations(function (state) {
	    data.forEach(function (entry) {
	      state.setIn([entity, entry.id], toImmutable(entry));
	    });
	  });
	}
@param {Immutable.Map} state
@param {Object} payload
@param {Model} payload.model
@param {any} payload.params
@param {Object|Array} payload.result