public static function checkFieldExists(TableMap $tableMap, $field)
    {
        $column = null;
        try {
            foreach($tableMap->getColumns() as $tableMapColumn) {
                $columnName = $tableMapColumn->getPhpName();
                if(preg_match('/^'.$field.'$/i', $columnName)) {
                    $column = $tableMapColumn;
                    break;
                }
            }
        } catch (\Exception $e) {
            Logger::log($e->getMessage(), LOG_DEBUG);
        }
        return $column;
    }