AR question (again)

Im having BELONGS_TO and HAS_MANY relations between two models.

When I call model1()->with(model2)->findAll(); result will return object of model2 inside property "model2" of model1.

Question is how to combine model2 properties with model1 properties using AR relations? I need that to be able to use result as soap response… nested objects do not work with soap as far as I tested.

One solution could be to query database without AR, but Im wondering if there is any other better way of achieving this.

Why not create a view in the database and build AR model against it?

Thank you for a tip.

Due to a possible performance troubles in future I wanted to omit using of views, but for some simple operations I could change my mind…

There's still a way of not using AR in special cases.