Revision #10 has been created by grigori on Nov 25, 2019, 10:50:43 PM with the memo:
minor syntax fixes
« previous (#9) next (#11) »
Changes
Title
unchanged
UUID instead of an auto-increment integer for ID with Active Record
Category
unchanged
How-tos
Yii version
unchanged
2.0
Tags
unchanged
mysql,active record,REST,UUID
Content
changed
[...]
{
private $idText;
```
Step 2 a. Add two filters
```php
['id','match', 'pattern'=>'/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i'],
// convert UUID from text value to binary and store the text value in a private variable
// this is a workaround for lack of mapping in active record[...]