Skip to content

Commit e2e8391

Browse files
authored
Merge pull request #30 from ADmad/patch-1
Update README
2 parents f48ba02 + dc8c322 commit e2e8391

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
9090
Specify 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 (
116116
Auto 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

Comments
 (0)