public function getter($key)
    {
        $property = $this;

        return function($object) use ($key, $property) {
            $value = $object->get($key);

            if (is_null($value) && $property->type->options()->primary) {
                return $property->reference($object);
            } else {
                return $value;
            }
        };
    }