MINOR: Add comment to explain ‘f’ coercion.

Follow-up to https://github.com/silverstripe/silverstripe-postgresql/pull/93
This commit is contained in:
Sam Minnee 2019-01-23 22:19:26 +13:00
parent f85b46d047
commit fd27c17a80
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ class PostgreSQLQuery extends Query
if (isset(self::$typeMapping[$type])) {
if ($type === 'bool' && $record[$k] === 't') {
$record[$k] = 1;
// Note that boolean 'f' will be converted to 0 by this
} else {
settype($record[$k], self::$typeMapping[$type]);
}