Hi all,
I run into an interesting problem recently. I use polymorphic relations to attach images and addresses to any model using behaviors. The behavior loads related models on Attach.
There is a performance issue, when the model is displayed in a grid view loaded through data provider. One possible solution might be extending attach function in behavior to check the owner scenario before loading the related models. Is there a way how to:
-
Enable (attach) behavior only on given scenario
-
Specify model scenario in data provider or related model
Thanks for your help!