@@ -25,7 +25,7 @@ composer require itosho/easy-query
2525### Upsert
2626
2727``` php
28- $this->Tags = TableRegistry::get('Tags');
28+ $this->Tags = TableRegistry::getTableLocator()-> get('Tags');
2929$this->Tags->addBehavior('Itosho/EasyQuery.Upsert', [
3030 'uniqueColumns' => ['name'],
3131 'updateColumns' => ['description', 'modified'],
@@ -42,7 +42,7 @@ $this->Tags->upsert($entity);
4242### Bulk Upsert
4343
4444``` php
45- $this->Tags = TableRegistry::get('Tags');
45+ $this->Tags = TableRegistry::getTableLocator()-> get('Tags');
4646$this->Tags->addBehavior('Itosho/EasyQuery.Upsert', [
4747 'updateColumns' => ['description', 'modified'],
4848]);
@@ -64,7 +64,7 @@ $this->Tags->bulkUpsert($entities);
6464### Bulk Insert
6565
6666``` php
67- $this->Articles = TableRegistry::get('Articles');
67+ $this->Articles = TableRegistry::getTableLocator()-> get('Articles');
6868$this->Articles->addBehavior('Itosho/EasyQuery.Insert');
6969
7070$data = [
@@ -90,7 +90,7 @@ For inserting a record just once.
9090Specify search conditions.
9191
9292``` php
93- $this->Articles = TableRegistry::get('Articles');
93+ $this->Articles = TableRegistry::getTableLocator()-> get('Articles');
9494$this->Articles->addBehavior('Itosho/EasyQuery.Insert');
9595
9696$data = [
@@ -116,7 +116,7 @@ SELECT 'New Article?', 'New Article Body?' FROM tmp WHERE NOT EXISTS (
116116Auto set search conditions with a inserting record.
117117
118118``` php
119- $this->Articles = TableRegistry::get('Articles');
119+ $this->Articles = TableRegistry::getTableLocator()-> get('Articles');
120120$this->Articles->addBehavior('Itosho/EasyQuery.Insert');
121121
122122$data = [
0 commit comments