mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 08:56:23 +08:00
Updated UPGRADE.md to mention JSON and Arrays support in AR
This commit is contained in:
@ -62,6 +62,10 @@ Upgrade from Yii 2.0.13
|
|||||||
`instanceof yii\db\Expression` in your code, you might consider changing that to checking for the interface and use the newly
|
`instanceof yii\db\Expression` in your code, you might consider changing that to checking for the interface and use the newly
|
||||||
introduced methods to retrieve the expression content.
|
introduced methods to retrieve the expression content.
|
||||||
|
|
||||||
|
* Added JSON support for PostgreSQL and MySQL as well as Arrays support for PostgreSQL on ActiveRecord layer.
|
||||||
|
In case you already implemented such support yourself, please switch to Yii implementation. Active Record will
|
||||||
|
return arrays instead of strings after data population and expects arrays to be assigned for further saving them into database.
|
||||||
|
|
||||||
* `yii\db\PdoValue` class has been introduced to replace a special syntax that was used to declare PDO parameter type
|
* `yii\db\PdoValue` class has been introduced to replace a special syntax that was used to declare PDO parameter type
|
||||||
when binding parameters to an SQL command, for example: `['value', \PDO::PARAM_STR]`.
|
when binding parameters to an SQL command, for example: `['value', \PDO::PARAM_STR]`.
|
||||||
You should use `new PdoValue('value', \PDO::PARAM_STR)` instead. Old syntax will be removed in Yii 2.1.
|
You should use `new PdoValue('value', \PDO::PARAM_STR)` instead. Old syntax will be removed in Yii 2.1.
|
||||||
|
|||||||
Reference in New Issue
Block a user