title: Propel connection commit for multiple inserts
body: <p>I wrote this code to add multiple clients and users to my database:</p>
  
  <pre><code>$oConnection = \Propel::getConnection();
      $oConnection-&gt;beginTransaction();
      for ( $i = 1; $i &lt;= 4; $i++ )
      {
          $oClient = new Client();
          $aData   = array(
              'companyname' =&gt; 'company' . $i,
              'contactname' =&gt; 'contact' . $i,
              'mail'        =&gt; 'mail' . $i . '@hotmail.com',
              'phone'       =&gt; '12345678',
              'active'      =&gt; true
          );
          $oClient-&gt;fromArray($aData, \BasePeer::TYPE_FIELDNAME);
          $oClient-&gt;save($oConnection);
          for ( $i = 1; $i &lt;= 4; $i++ )
          {
              $oUser = new User();
              $aData = array(
                  'client_id' =&gt; $oClient-&gt;getId(),
                  'firstname'    =&gt; 'firstname' . $i,
                  'lastname'     =&gt; 'lastname' . $i,
                  'mail'         =&gt; 'mail' . $i . '@hotmail.com',
              );
              $oUser-&gt;fromArray($aData, \BasePeer::TYPE_FIELDNAME);
              $oUser-&gt;save($oConnection);
          }
      }
      $oConnection-&gt;commit();
  </code></pre>
  
  <p>Somehow this only creates one client with four users affected to him not four clients with four users for each one.</p>