private static function getEntityType($owningEntity, $key)
    {
        $config = self::getConfig();
        $owningClass = ClassUtils::getClass($owningEntity);
        if (isset($config[$owningClass][$key])) {
            return $config[$owningClass][$key]['type'];
        }

        return null;
    }