Table structure is the same, different table names, how to use the same model:
(SELECT id FROM bj_income UNION ALL SELECT id FROM sd_income) as income
you can, but you shouldnt change model source ( table) dynamically.
This topic will help: https://forum.phalcon.io/discussion/2927/change-table-of-model
Hi there you can try with inheritance for example
abstract class Base { private $id; private $name; public function initialize() { $this->setSource('same_table'); } } class ModelOne extends Base { //empty model } class ModelTwo extends Base { //empty model }