We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

MySQL model with PARTITION

Hi. I'm looking for a solution to set custom partition with MySQL models in Phalcon. I tried to figure it out with modelsManager, behaviours, events etc., but still can not find a solution. What I'm looking for:


$model = new SomeThing;

// or

$model->find(['partition' => 'p1']); // with conditions

And the output should be:

SELECT `id`, `name` FROM `something` PARTITION (`p1`);

Thanks in advance.

Afaik PHQL doesn't support partitions... you'd have to rewrite the PHQL parser logic for it to work.

You should submit a NFR on github