Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

afterFind on relations

$
0
0
We have some code that needs to run on our ActiveRecord 'Town' whenever it is loaded.

If we load it like this, we can use afterFind to do this:

Town::model()->findByPk(1)



However, if we load it through a relation in the User active record, afterFind doesn't get called.

Are we doing something wrong? What's the best solution?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>