final function KeyField()
    {
        if (!$this->keyField)
        {
            $fieldMappers = $this->FieldMappers();
            foreach ($fieldMappers as $name=>$mapper)
            {
                $keyInfo = $mapper->FieldInfo()->KeyInfo();
                if ($keyInfo && $keyInfo->IsPrimary())
                {
                    $this->keyField = $name;
                    break;
                }
            }
            if (!$this->keyField)
            {
                throw new \Exception('No (primary) key field found in ' . $this->TableName());
            }
        }
        return $this->keyField;
    }