src/back/models/EntitySpecification.js
function _loadEntityMethod(func, name) {
    expect(_attributes).to.not.have.ownProperty(
      name,
      'failed to load entity method "' + name + '" because there is an ' +
      'attribute with same name in the current Entity and it cannot be ' +
      'overloaded'
    );

    if (_Entity.General) {
      expect(_Entity.General.attributes).to.not.have.ownProperty(
        name,
        'failed to load entity method "' + name + '" because there is an ' +
        'attribute with same name in a parent of current Entity and it ' +
        'cannot be overriden'
      );
    }

    var entitySpecializations = _Entity.specializations;
    for (var specialization in entitySpecializations) {
      expect(entitySpecializations[specialization].specification.attributes)
        .to.not.have.ownProperty(
        name,
        'failed to load entity method "' + name + '" because there is an ' +
        'attribute with same name in a child of current Entity'
      );
    }

    _Entity.prototype[name] = func;
  }
function _loadEntityMethod(func, name) {
    expect(_attributes).to.not.have.ownProperty(
      name,
      'failed to load entity method "' + name + '" because there is an ' +
      'attribute with same name in the current Entity and it cannot be ' +
      'overloaded'
    );

    if (_Entity.General) {
      expect(_Entity.General.attributes).to.not.have.ownProperty(
        name,
        'failed to load entity method "' + name + '" because there is an ' +
        'attribute with same name in a parent of current Entity and it ' +
        'cannot be overriden'
      );
    }

    var entitySpecializations = _Entity.specializations;
    for (var specialization in entitySpecializations) {
      expect(entitySpecializations[specialization].specification.attributes)
        .to.not.have.ownProperty(
        name,
        'failed to load entity method "' + name + '" because there is an ' +
        'attribute with same name in a child of current Entity'
      );
    }

    _Entity.prototype[name] = func;
  }
function _loadEntityMethod ( func , name ) { expect ( _attributes ) . to . not . have . ownProperty ( name , 'failed to load entity method "' + name + '" because there is an ' + 'attribute with same name in the current Entity and it cannot be ' + 'overloaded' ) ; if ( _Entity . General ) { expect ( _Entity . General . attributes ) . to . not . have . ownProperty ( name , 'failed to load entity method "' + name + '" because there is an ' + 'attribute with same name in a parent of current Entity and it ' + 'cannot be overriden' ) ; } var entitySpecializations = _Entity . specializations ; for ( var specialization in entitySpecializations ) { expect ( entitySpecializations [ specialization ] . specification . attributes ) . to . not . have . ownProperty ( name , 'failed to load entity method "' + name + '" because there is an ' + 'attribute with same name in a child of current Entity' ) ; } _Entity . prototype [ name ] = func ; }
Loads a method of the Entity that is associated with the current
specification.
@name
module:back4app-entity/models.EntitySpecification~_loadEntityMethod
@function
@param {!function} func The method's function to be loaded.
@param {!string} name The method's name to be loaded.
@private
@example
_loadEntityMethod(someMethodFunction, someMethodName);
Loads a method of the Entity that is associated with the current specification .