- replaced static use of "id" as primary key with model->getPrimaryKey()