'Lazy-load the object referenced by ``self.key``. ``self.key``
should be the ``primary_key``.'

@property
def object(self):

    id_field = self._document()._meta['id_field']
    id_field_type = type(id_field)
    if (not isinstance(self.key, id_field_type)):
        try:
            self.key = id_field_type(self.key)
        except Exception:
            raise Exception(('Could    not    cast    key    as    %s' % id_field_type.__name__))
    if (not hasattr(self, '_key_object')):
        self._key_object = self._document.objects.with_id(self.key)
        return self._key_object
    return self._key_object
