Author: jwage
Date: 2008-08-27 05:38:13 +0100 (Wed, 27 Aug 2008)
New Revision: 4840

Modified:
   branches/1.0/lib/Doctrine/Search.php
Log:
fixes #1334


Modified: branches/1.0/lib/Doctrine/Search.php
===================================================================
--- branches/1.0/lib/Doctrine/Search.php        2008-08-27 04:28:37 UTC (rev 
4839)
+++ branches/1.0/lib/Doctrine/Search.php        2008-08-27 04:38:13 UTC (rev 
4840)
@@ -177,15 +177,15 @@
                . ' WHERE ' . $conn->quoteIdentifier($id)
                . ' IN (SELECT ' . $conn->quoteIdentifier($id)
                . ' FROM ' . 
$conn->quoteIdentifier($this->_table->getTableName())
-               . ' WHERE keyword IS NULL)';
+               . ' WHERE keyword IS NULL) OR ' . $conn->quoteIdentifier($id)
+               . ' NOT IN (SELECT ' . $conn->quoteIdentifier($id)
+               . ' FROM ' . 
$conn->quoteIdentifier($this->_table->getTableName()) . ')';
 
         $query = $conn->modifyLimitQuery($query, $limit, $offset);
 
         return $conn->fetchAll($query);
     }
-    
 
-
     /**
      * batchUpdateIndex 
      * 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to