Merged in bugfix/PMC-112 (pull request #6870)

PMC-112

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2019-04-30 20:20:55 +00:00
committed by Julio Cesar Laura Avendaño
3 changed files with 92 additions and 13 deletions

View File

@@ -1006,4 +1006,24 @@ class PmTable
}
return $oCriteria;
}
/**
* Get the type of the column ex: string, int, double, boolean
*
* @param string $pmTablePeer
* @param string $tableName
* @param string $columnName
*
* @return string
*/
public static function getTypeOfColumn($pmTablePeer, $tableName, $columnName)
{
try {
$type = $pmTablePeer::getMapBuilder()->getDatabaseMap()->getTable($tableName)->getColumn($columnName)->getCreoleType();
} catch (Exception $e) {
return '';
}
return $type;
}
}