code: function(_obj, _idx) {
        Utils.assert(_obj.$type && _obj.$type === this.$type, 'Collection $add expects record of the same $type');
  
        return this.$action(function() {
          if(_obj.$position === undefined) {
            if(_idx !== undefined) {
              this.splice(_idx, 0, _obj);
            } else {
              this.push(_obj);
            }
            _obj.$position = true; // use true for now, keeping position updated can be expensive
            this.$dispatch('after-add', [_obj]);
          }
        });
      }
docs: @memberof CollectionApi#
  
  @description Adds an item to the back of the collection. This method does not attempt to send changes
  to the server. To create a new item and add it use $create or $build.
  
  Triggers after-add callbacks.
  
  @param {RecordApi} _obj Item to be added
  @return {CollectionApi} self