is it possible to retrieve data from relational objects via the CHtml::active* Methods?
which resulted in an error.
Looking at the code of CActiveRecord it seems not to be possible? What would be the correct approach here?
Writing this, it comes to my mind that
could work. But I don't like this, because I need to change all occurrences of 'relation' when this changes or a good refactoring tool.
The other thing I'd like to know is where to put business logic especially when this logic operates on multiple ActiveRecords.
What do you mean by "CHtml($myModel, 'relation.property')"? This is not a valid PHP expression anyway because CHtml is a class.
Sorry, I was not paying enough attention to the code.
What I meant was
where 'relation' is a relational property of myModel like an address for a person.
So one could translate this to
This is not supported, and I'm afraid we won't support it in future because it introduces too much code complexity, lowers performance, without much benefit.
As a workaround, you could pass 'address'=>$person->address to the view and therefore be able to use