0

My question is related to Yii framework.

I have defined relations in a model class . How can I return some specific fields of the join in CActiveDataProvider ?

hd.
  • 17,596
  • 46
  • 115
  • 165
  • 1
    `CActiveDataProvider` accepts a pre-constructed query. For example: `$finder = Post::model(); $finder->with('Comment.Author'); $finder->condition = 't.published = 1'; $provider = new CActiveDataProvider($finder);` will give the data provider access to the results of that query. Then you should have access to those relations same as if you had queried them yourself. – DCoder Dec 28 '12 at 14:27
  • I dont think you would need this on your data provider, what is it you really want? – Asgaroth Dec 28 '12 at 14:32
  • Please see here: http://stackoverflow.com/questions/14070053/add-new-property-in-model-file-of-a-active-record-in-yii It was my first question – hd. Dec 28 '12 at 14:38

0 Answers0