title: How to make PDO queries in cakePHP?
body: <p>I mean there must be a PDO Object initialized somewhere, and I want to use that instead of creating a parallel connection.</p>
  
  <p>By request, here's the story behind it:
  I'm making a registration form, which saves to two models, (Firms and Users) with a HABTM connection between them. CakePHP cannot work with HABTM in this form, so without ruining the model I had to do something like this:</p>
  
  <pre><code>    if ($this-&gt;request-&gt;is('post')) {
  
          $this-&gt;Firm-&gt;create();
          if ($this-&gt;Firm-&gt;saveAll($this-&gt;request-&gt;data)) {
  
              for($i=0; $i&lt;count($this-&gt;request-&gt;data['User']); $i++){ //működik :)
                  $this-&gt;User-&gt;create(); // ?
  
                  $a = $this-&gt;request-&gt;data['User'][$i];
  
                  $b = randomString(28);
                  $a['password'] = $b;
                  $a['plain_password'] = $b;
                  if($this-&gt;User-&gt;save($a)){
                      $this-&gt;Session-&gt;setFlash(__('The firm and a user have been saved.')); // no good
                  }
              }
  
              //$this-&gt;Session-&gt;setFlash(__('The firm has been saved.'));
               return $this-&gt;redirect(array('action' =&gt; 'index'));
          } else {
              $this-&gt;Session-&gt;setFlash(__('The firm could not be saved. Please, try again.'));
          }
  </code></pre>
  
  <p>I want to simply do a query, something like <code>INSERT INTO firms_users (user_id,firm_id) VALUES ($u,$f)</code>, because this is what the model can't do for me because of HABTM.</p>
  
  <p>It would be great if this was done using a transaction, but I guess, using cakePHP standards, it's simply not possible.</p>