I do not have the same experience, and this comment is for those who are having problems.
Using mysql view with some joins and calculations, I get the following error.
app\\models\\db\\WarComplete must have a primary key.
I solved this by adding ...
public static function primaryKey() { return ['id']; }
... to my redefinition of the model.
source share