title: Zend Table Relationship with Primary Composite Key - delete record from table
body: <p>I have three tables</p>
  
  <pre><code>//1
  CREATE TABLE `client_domain` (
    `client_id` int(10) unsigned NOT NULL,
    `domain_id` int(10) unsigned NOT NULL,
    PRIMARY KEY (`client_id`,`domain_id`),
    KEY `FK_client_domains_domain` (`domain_id`),
    CONSTRAINT `FK_client_domain` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE CASCADE,
    CONSTRAINT `FK_client_domains_client` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf-8;
  //2
  CREATE TABLE `client` (
    `id` int(10) unsigned NOT NULL,
    `name` varchar(50) NOT NULL,
    `notes` text,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf-8;
  //3
  CREATE TABLE `domain` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `domain_name` varchar(50) DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `IX_domain` (`domain_name`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf-8;
  </code></pre>
  
  <p>All work fine but, when I'm trying to delete record from client_domain table using:</p>
  
  <pre><code>$del = new ClientDom(array('db' =&gt; $this-&gt;_adapter));
  $where[] = $del-&gt;getAdapter()-&gt;quoteInto('client_id = ?', $client);
  $where[] = $del-&gt;getAdapter()-&gt;quoteInto('domain_id = ?', $domain);
  $result = $del-&gt;delete($where)-&gt;toArray(); Idelete record but with an error:
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'client_id' in 'where clause'...
  </code></pre>
  
  <p>What is wrong... Also the same thing if I 'fetchAll($where)' but on insert all work fine.</p>