We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon model unique key

Good afternoon. I need to get unique parameter name of the extended model from \Phalcon\Mvc\Model I found only protected property "uniqueKey", but data there like "object_id = ?" need to parse string to get the name. The question is there in Phalcon/Mvc/Model any method which can return the name of primary key of the model or just value of it ? Thank you.



2.2k
Accepted
answer
edited Aug '16

Thank you, there is a method getIdentityField()