setIntegrityCheck() public method

Setting this flag to false skips the checks for table joins, allowing 'hybrid' table rows to be created.
public setIntegrityCheck ( $flag = true ) : Zend_Db_Select
return Zend_Db_Select This Zend_Db_Select object.
Example #1
0
File: Table.php Project: abdala/la
 protected function addAutoJoin(Zend_Db_Table_Select $select)
 {
     $tables = array();
     $columns = array();
     $references = $this->getDefaultAdapter()->getReferences(null, $this->_name);
     if ($references) {
         foreach ($references as $key => $reference) {
             $tableName = $reference['table'];
             $table = new La_Db_Table($tableName);
             $columnName = $table->getNameForOptionField();
             $comments = $this->getComments();
             $column = $reference['columns'];
             $columnAlias = $comments[$column];
             $tableAlias = $tableName . $key;
             $columns[$columnAlias] = $tableAlias . '.' . $columnName;
             $tables[$tableName] = $tableName;
             $joinTable = array($tableAlias => $tableName);
             $condition = sprintf('`%s`.`id` = `%s`.`%s`', $tableAlias, $this->_name, $column);
             $select->joinLeft($joinTable, $condition, array());
         }
         $select->setIntegrityCheck(false)->columns($columns);
     }
     return $select;
 }