Issue Type: Bug Created: 2011-11-15T20:50:33.000+0000 Last Updated: 2011-11-15T20:50:33.000+0000 Status: Open Fix version(s): Reporter: David Inglis (centurious) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db
Related issues: Attachments:
When using the createRow and getMetaData methods on a Zend_Db_Table_Abstract model, the schema of the table is not taken into account. From what I can see the Adapter uses the following command to get the meta data:
$sql = "exec sp_columns @table_name = " . $this->quoteIdentifier($tableName, true); $stmt = $this->query($sql); $result = $stmt->fetchAll(Zend_Db::FETCH_NUM);
From the method definition:
public function describeTable($tableName, $schemaName = null)
The schema is passed to the method but never used. In Microsoft SQL Server, the sp_columns command has the following syntax:
sp_columns [ @table_name = ] object [ , [ @table_owner = ] owner ] [ , [ @table_qualifier = ] qualifier ] [ , [ @column_name = ] column ] [ , [ @ODBCVer = ] ODBCVer ]
The @table_owner parameter seems to limit the meta data returned to the correct schema if this is passed into it.
No comments to display
Have you found an issue?
See the Overview section for more details.