1
0
mirror of synced 2025-02-20 14:13:15 +03:00

fixed updateIndex()

This commit is contained in:
zYne 2007-10-18 19:37:50 +00:00
parent 6825767cba
commit ee1cf1013a

View File

@ -90,12 +90,17 @@ class Doctrine_Search extends Doctrine_Plugin
$fields = $this->getOption('fields');
$class = $this->getOption('className');
$name = $this->getOption('resource')->getComponentName();
$conn = $this->getOption('resource')->getConnection();
$identifier = $this->_options['resource']->getIdentifier();
Doctrine_Query::create()->delete()
->from($class)
->where($identifier . ' = ?', array($data[$identifier]))
->execute();;
if ($this->_options['batchUpdates'] === true) {
$conn = $this->getOption('resource')->getConnection();
$index = new $class();
foreach ((array) $this->_options['resource']->getIdentifier() as $id) {
$index->$id = $data[$id];
}