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

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

      expect(_Entity.General.methods).to.not.respondTo(
        attribute.name,
        'failed to load entity attribute "' + attribute.name + '" because ' +
        'there is a method 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(
        attribute.name,
        'failed to load entity attribute "' + attribute.name + '" because ' +
        'there is an attribute with same name in a child of current Entity'
      );

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

    _Entity.adapter.loadEntityAttribute(_Entity, attribute);
  }
function _loadEntityAttribute(attribute) {
    expect(_methods).to.not.have.ownProperty(
      attribute.name,
      'failed to load entity attribute "' + attribute.name + '" because ' +
      'there is a method with same name in the current Entity and it cannot ' +
      'be overloaded'
    );

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

      expect(_Entity.General.methods).to.not.respondTo(
        attribute.name,
        'failed to load entity attribute "' + attribute.name + '" because ' +
        'there is a method 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(
        attribute.name,
        'failed to load entity attribute "' + attribute.name + '" because ' +
        'there is an attribute with same name in a child of current Entity'
      );

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

    _Entity.adapter.loadEntityAttribute(_Entity, attribute);
  }
function _loadEntityAttribute ( attribute ) { expect ( _methods ) . to . not . have . ownProperty ( attribute . name , 'failed to load entity attribute "' + attribute . name + '" because ' + 'there is a method with same name in the current Entity and it cannot ' + 'be overloaded' ) ; if ( _Entity . General ) { expect ( _Entity . General . attributes ) . to . not . have . ownProperty ( attribute . name , 'failed to load entity attribute "' + attribute . name + '" because ' + 'there is an attribute with same name in a parent of current Entity ' + 'and it cannot be overriden' ) ; expect ( _Entity . General . methods ) . to . not . respondTo ( attribute . name , 'failed to load entity attribute "' + attribute . name + '" because ' + 'there is a method 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 ( attribute . name , 'failed to load entity attribute "' + attribute . name + '" because ' + 'there is an attribute with same name in a child of current Entity' ) ; expect ( entitySpecializations [ specialization ] . specification . methods ) . to . not . have . ownProperty ( attribute . name , 'failed to load entity attribute "' + attribute . name + '" because ' + 'there is a method with same name in a child of current Entity' ) ; } _Entity . adapter . loadEntityAttribute ( _Entity , attribute ) ; }
Loads an attribute of the Entity that is associated with the current
specification.
@name
module:back4app-entity/models.EntitySpecification~_loadEntityAttribute
@function
@param {!module:back4app-entity/models/attributes.Attribute} attribute The
attribute to be loaded.
@private
@example
_loadEntityAttribute(someAttribute);
Loads an attribute of the Entity that is associated with the current specification .