Yii2 Model Relationships

In Yii 1.1 the models had a relations function to define relationships between models. I believe that some database engines were supported so it would be made automatically. Is this possible in Yii2? What is the best practice in Yii2 to achieve the same functionality (i.e. establish model relationships in order to join tables via Yii).


Yes, 2.0 Gii is able to generate relations in the same way 1.1 did.