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
```