Changing/force the primary key for actionUpdate($id)

Hi,

I’ve been developing a REST API and faced a problem. The problem is: The database contains a table called Transaction. The transaction table has fields [id, gid, pid, …]. I would like to update the row relaying on [gid, pid] but the actionUpdate($id) wants to take $id of the model, because of the implementation as is here https://github.com/yiisoft/yii2/blob/master/framework/rest/UpdateAction.php

Unfortunatelly I wouldn’t like to change the PK as [id, gid, pid] or [gid, pid], just want to keep it as is [id]. Is there any way to force the action to take others parameters to find & update a proper row?

Cheers,

Andrzej

How about overriding this action?

Thanks Bizley. I think there is no another way to do that (I wanted to avoid it, I like so much the whole magic that Yii does in the generic actions).