Commit ee1cf101 authored by zYne's avatar zYne

fixed updateIndex()

parent 6825767c
......@@ -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];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment