Creates a ToOneRelationship
Gets the id of the document for this relationship.
Sets the id for this relation.
If there is a model already loaded and the newid makes the relationship invalid, it will remove the model aswell.
Id to assign.
The loaded model
Gets the model if it is validated against the id, or undefined otherwise.
Whether or not the id and the model match.
If the id is falsy, the value must be falsy too to be valid. If there is an id, then the model must be loaded and have the same id.
Class holding a reference to an item that can be loaded or not