Answer the question
In order to leave comments, you need to log in
How to deal with postgresql table partitioning in YII framework?
The architecture of the table is as follows: I break the table of media data by type (video, text, audio). I want only to read from the general table, and to write in splits. I did not master the creation of an adequate model for the task, i.e. rendered the common table into the modules and into the partition submodules, the views do not work at the same time - eternal database errors, although direct queries work.
Answer the question
In order to leave comments, you need to log in
I solved the issue like this:
1) all models in one module (both the main table and its partitions)
2) for models (video, audio, text) created new actions with views through $this->renderPartial(MY_VIEW)
3) customized for different view sources (for example, for video: youtube, vimeo)
4) for editing I call from the view for the main table:
$this->beginClip('content');
Yii::app()->runController('MODULE_NAME/'.$data->type.'/ACTION/id/'.$data->id);
$this->endClip('content');
echo $this->clips['content'];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question