code: function(attr) {
        var value = this.get(attr);
        if (value) {
          if (!(value instanceof Parse.Relation)) {
            throw "Called relation() on non-relation field " + attr;
          }
          value._ensureParentAndKey(this, attr);
          return value;
        } else {
          return new Parse.Relation(this, attr);
        }
      }
docs: Gets a relation on the given class for the attribute.
  @param String attr The attribute to get the relation for.