Replace hard-coded ":id" with data from model

Instead of hard-coding ":id" as the primary key, use the name stored for
the primary key from the model.

Applies to mixonic/ranked-model#38

Now with some tests. - @mixonic
Merge pull request #40 from mixonic/netactive-issue-38

Replace hard-coded ":id" with data from model