code: function(association, fn, thisArg) {
      var path = association.split('.');
      var assoc = [];
      var modelClass = this._model;
  
      path.forEach(function(name, index) {
        var relation = modelClass.__class__.prototype[name + 'Relation'];
        if (!relation) {
          throw this._relationIterationError(association, name);
        }
  
        var expanded = relation.expand();
        if (expanded) {
          assoc.push(name);
          this._expandedRelationForEach(assoc.join('.'),
            relation, expanded, fn, thisArg);
        }
        else {
          assoc.push(name);
          fn.call(thisArg, assoc.join('.'), relation, {
            index: index,
          });
        }
  
        // get model class for next iteration
        modelClass = relation.relatedModelClass;
      }, this);
    }
docs: @function BoundHelpers~RelationIterator
  @param {String} association The path to this association.
  @param {Relation} relation The relation for this association.
  @param {Object} BoundHelpers~RelationIterationDetails
   
  Iterate through an association string (a key path for a relationship)
  while taking into account expanded relationships. Expanded relationships
  will referred to simply as _through_ relationships in the documentation of
  this method, but could possibly be used in other ways.
  
  The _source_ of a _through_ relation will actually cause two invocations
  of the callback function to occur. The first will be with the fully
  expanded association name. The second will be with the _through_
  association name used in the given association string. The first one will
  have the `expanded` detail flag set, and the second one will not.
  
  @method
  @private
  @param {String} association Relation key path.
  @param {BoundHelpers~RelationIterator} fn The callback function.
  @param {Object} thisArg The value of `this` for the callback function.