Hi everyone.
I can’t seem to find a clear answer on this despite searching the forum and web all night.
Picture this. I have a view that loads {n} number of a model form in tabular fashion. For each form in the tabular view, I then have a grid view (or several grid views) that displays related data (HAS_MANY relations). At the moment, I create the data provider required for each partial grid view at the bottom of the parent form view file, then I call a render partial to bring the grid view in.
Can anyone tell me if it is appropriate to create/instantiate a CActiveDataProvider from within a view file? I’ve read that true MVC best practice is to never explicitly do database queries from within a view.