src/Versatile/Introspection/EloquentTypeIntrospector.php
public function keyType($class, $path)
    {

        // Allows manual overwrites if titles
        if ($type = $this->getManualKeyType($this->getClassName($class),$path)) {
            return $type;
        }

        try{

            // First check if path is a related key (account.owner.id)
            if ($this->parser->isRelatedKey($path)) {

                list($join, $key) = $this->parser->toJoinAndKey($path);
                $className = $this->pathIntrospector->classOfPath($class, $join);

            } else { // No related key

                $className = $this->getClassName($class);
                $key = $path;

            }

            if ($type = $this->getManualKeyType($className, $key)) {
                return $type;
            }

            if ($this->isDate($className, $key)) {
                $type = new TemporalType();
                $type->setFormat($this->defaultDateFormat);
                return $type;
            }

        }
        catch(UnexpectedValueException $e){
            return;
        }

    }
public function keyType($class, $path)
    {

        // Allows manual overwrites if titles
        if ($type = $this->getManualKeyType($this->getClassName($class),$path)) {
            return $type;
        }

        try{

            // First check if path is a related key (account.owner.id)
            if ($this->parser->isRelatedKey($path)) {

                list($join, $key) = $this->parser->toJoinAndKey($path);
                $className = $this->pathIntrospector->classOfPath($class, $join);

            } else { // No related key

                $className = $this->getClassName($class);
                $key = $path;

            }

            if ($type = $this->getManualKeyType($className, $key)) {
                return $type;
            }

            if ($this->isDate($className, $key)) {
                $type = new TemporalType();
                $type->setFormat($this->defaultDateFormat);
                return $type;
            }

        }
        catch(UnexpectedValueException $e){
            return;
        }

    }
{@inheritdoc}

@param string|object $class The class or an object of it
@param string $path A key name. Can be dotted like address.street.name
@return \Xtype\AbstractType