You can mention below code in your Model
public $primaryKey = 'doc_it';
and then you can use $this->YourModel->id;
in your controller to access the primary key.
Question
CakePHP uses 'id' as primary key. How can I override this limitation.
I have data_base with primary key as doc_it, and I am using save() for updating the records.
I have check previous threads, but wasn't able to fix the issue.
Solution
You can mention below code in your Model
public $primaryKey = 'doc_it';
and then you can use $this->YourModel->id;
in your controller to access the primary key.