-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to string primary key via Model::delete($id)
- Loading branch information
1 parent
9355f03
commit 6e59f9c
Showing
5 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ public function run() | |
{ | ||
// Job Data | ||
$data = [ | ||
'user' => [ | ||
'user' => [ | ||
[ | ||
'name' => 'Derek Jones', | ||
'email' => '[email protected]', | ||
|
@@ -28,7 +28,7 @@ public function run() | |
'country' => 'UK', | ||
], | ||
], | ||
'job' => [ | ||
'job' => [ | ||
[ | ||
'name' => 'Developer', | ||
'description' => 'Awesome job, but sometimes makes you bored', | ||
|
@@ -46,7 +46,7 @@ public function run() | |
'description' => 'Only Coldplay can actually called Musician', | ||
], | ||
], | ||
'misc' => [ | ||
'misc' => [ | ||
[ | ||
'key' => '\\xxxfoo456', | ||
'value' => 'Entry with \\xxx', | ||
|
@@ -60,6 +60,12 @@ public function run() | |
'value' => ' One two three tab', | ||
], | ||
], | ||
'stringifypkey' => [ | ||
[ | ||
'id' => 'A01', | ||
'value' => 'test', | ||
], | ||
], | ||
]; | ||
|
||
foreach ($data as $table => $dummy_data) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php namespace Tests\Support\Models; | ||
|
||
use CodeIgniter\Model; | ||
|
||
class StringifyPkeyModel extends Model | ||
{ | ||
protected $table = 'stringifypkey'; | ||
protected $returnType = 'object'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters