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

Override Phalcon\Model::create()

Hi (again),

I need to override the create-function of Phalcon\Model, because I will only use MySQL/MariaDB for my project.

I've defined a table with uniques. Therefor I don't wanna check, if the unique-title already exists. So I just wanna use: "INSERT IGNORE ...".

In the docs, there is nothing said about override the function. Is it possible or must I create a function with another name?

Thanks alot (again)



33.8k

Yeah, you can override it.