What is the difference between $with and $joinWith in Yii2 and when to use them?
Asked 07 September, 2021
Viewed 1.9K times
  • 61
Votes

In the API documentation it is specified that


  
  • $joinWith - A list of relations that this query should be joined with
  • $with - A list of relations that this query should be performed with

What is the difference between these ActiveQuery property and under what situation should we use $joinWith and $with?

3 Answer