Fixes `Getting unknown property` in Yii2 module

If record primary key is not `id`, then error is thrown when using `haveRecord()` method.

```
yii\base\UnknownPropertyException: Getting unknown property: app\models\ModelName::id
```
Merge pull request #1549 from armab/patch-1

Fixes `Getting unknown property` in Yii2 module