Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions en/orm/database-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,12 @@ CakePHP's database layer will automatically convert our JSON data when creating
queries. You can use the custom types you've created by mapping the types in
your Table's :ref:`_initializeSchema() method <saving-complex-types>`::

use Cake\Database\Schema\Table as Schema;
use Cake\Database\Schema\TableSchema;

class WidgetsTable extends Table
{

protected function _initializeSchema(Schema $schema)
protected function _initializeSchema(TableSchema $schema)
{
$schema->columnType('widget_prefs', 'json');
return $schema;
Expand Down
4 changes: 2 additions & 2 deletions en/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1074,12 +1074,12 @@ column Types::
Type::map('json', 'App\Database\Type\JsonType');

// In src/Model/Table/UsersTable.php
use Cake\Database\Schema\Table as Schema;
use Cake\Database\Schema\TableSchema;

class UsersTable extends Table
{

protected function _initializeSchema(Schema $schema)
protected function _initializeSchema(TableSchema $schema)
{
$schema->columnType('preferences', 'json');
return $schema;
Expand Down