code: function(parent, key) {
        this.parent = this.parent || parent;
        this.key = this.key || key;
        if (this.parent !== parent) {
          throw "Internal Error. Relation retrieved from two different Objects.";
        }
        if (this.key !== key) {
          throw "Internal Error. Relation retrieved from two different keys.";
        }
      }
docs: Makes sure that this relation has the right parent and key.