Fix #18000: PK value of Oracle ActiveRecord is missing after save

This commit is contained in:
Kwok
2020-05-02 07:17:27 +08:00
committed by GitHub
parent c32811887a
commit 89ded8c82a
5 changed files with 46 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Yii Framework 2 Change Log
- Bug #17960: Fix unsigned primary key type mapping for SQLite (bizley)
- Enh #17758: `Query::withQuery()` can be used for CTE (sartor)
- Bug #17974: Fix ActiveRelationTrait compatibility with PHP 7.4 (Ximich)
- Bug #18000: PK value of Oracle ActiveRecord is missing after save (mankwok)
- Enh #18006: Allow SameSite cookie pre PHP 7.3 (scottix)

View File

@ -614,7 +614,7 @@ SQL;
$phName = QueryBuilder::PARAM_PREFIX . (count($params) + count($returnParams));
$returnParams[$phName] = [
'column' => $name,
'value' => null,
'value' => '',
];
if (!isset($columnSchemas[$name]) || $columnSchemas[$name]->phpType !== 'integer') {
$returnParams[$phName]['dataType'] = \PDO::PARAM_STR;