protected function getCompositeKeyCondition($values)
{
$primary = $this->getTableInfo()->getPrimaryKeys();
$count = count($primary);
if ($count === 0) {
throw new TDbException('dbtablegateway_no_primary_key_found', $this->getTableInfo()->getTableFullName());
}
if (!is_array($values) || count($values) === 0) {
throw new TDbException('dbtablegateway_missing_pk_values', $this->getTableInfo()->getTableFullName());
}
if ($count > 1 && (!isset($values[0]) || !is_array($values[0]))) {
$values = array($values);
}
if ($count > 1 && count($values[0]) !== $count) {
throw new TDbException('dbtablegateway_pk_value_count_mismatch', $this->getTableInfo()->getTableFullName());
}
return $this->getIndexKeyCondition($this->getTableInfo(), $primary, $values);
}