/**
 * @class CM_Model_Abstract
 * @extends Backbone.Model
 */
var CM_Model_Abstract = Backbone.Model.extend({

  _class: 'CM_Model_Abstract',

  idAttribute: '_compoundId',

  initialize: function() {
    this.set('_compoundId', this.get('_id').id + '-' + this.get('_type'));
  },

  toJSON: function() {
    return {_id: this.get('_id'), _type: this.get('_type'), _class: this._class};
  }
});

/**
 * @class CM_Model_Abstract
 * @extends Backbone.Model
 */
var CM_Model_Abstract = Backbone.Model.extend({

  _class: 'CM_Model_Abstract',

  idAttribute: '_compoundId',

  initialize: function() {
    var _id = this.get('_id');
    if (!$.isPlainObject(_id)) {
      throw new Error('`_id` field must be a hash object');
    }
    var idParts = _.values(_id).concat(this.get('_type'));
    this.set('_compoundId', idParts.join('-'));
  },

  toJSON: function() {
    return {_id: this.get('_id'), _type: this.get('_type'), _class: this._class};
  }
});

Use all `_id` parts for `compoundId`
Use all `_id` parts for `compoundId`
