models backed by views don't assume "id" columns are the primary key.

Closes #10247.

The same goes for tables with an "id" column but without primary key constraint.
Reading from the view works without configuration. If you have an updateable view
you need to use `self.primary_key = ''`.