Ticket #1334 (closed defect: fixed)
Wrong query in Doctrine_Search:readTableData method
| Reported by: | honza.trtik | Owned by: | jwage |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Searchable | Version: | 1.0.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description
Doctrine_Search:readTableData method is supposed to return array of record ids, which are not indexed
$query = 'SELECT * FROM ' . $conn->quoteIdentifier($tableName)
. ' WHERE ' . $conn->quoteIdentifier($id)
. ' IN (SELECT ' . $conn->quoteIdentifier($id)
. ' FROM ' . $conn->quoteIdentifier($this->_table->getTableName())
. ' WHERE keyword IS NULL)';
this query always returns empty array, i think, it should be replaced by something like
$query = 'SELECT * FROM ' . $conn->quoteIdentifier($tableName)
. ' WHERE ' . $conn->quoteIdentifier($id)
. ' NOT IN (SELECT ' . $conn->quoteIdentifier($id)
. ' FROM ' . $conn->quoteIdentifier($this->_table->getTableName()) . ')';
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
