code: function(attrs, options) {
        if (this._isEntity(attrs)) {
          if (!attrs.collection) attrs.collection = this;
          return attrs;
        }
        options = options ? langx.clone(options) : {};
        options.collection = this;
        var entity = new this.entity(attrs, options);
        if (!entity.validationError) return entity;
        this.trigger('invalid', this, entity.validationError, options);
        return false;
      }
docs: Prepare a hash of attributes (or other entity) to be added to this collection.