title: Yii2 save related records in single save call in single transaction
body: <p>In yii2 how can i save multiple related records into db into single save call and single transaction.
  I have two tables:</p>
  
  <pre><code>User - id, name
  UserAddress - id , user_id , city
  </code></pre>
  
  <p>User table has one to many relation to UserAdress table</p>
  
  <p>What i want to do is : </p>
  
  <pre><code>UserAddress ua = new UserAddress();
  ua.city = "fff"
  
  User u = new User();
  u.name = "test";
  u.userAddress = new Array(ua);
  u.save();
  </code></pre>
  
  <p>calling save on user should save user and useraddress with user_id set to user.id as well</p>