removed support for unlinkAll() from elasticsearch

feature is not reliable

fixes #5136
This commit is contained in:
Carsten Brandt
2014-09-23 12:56:05 +02:00
parent 3b0f561480
commit 982a27db83
3 changed files with 54 additions and 4 deletions

View File

@ -10,6 +10,7 @@ namespace yii\elasticsearch;
use Yii;
use yii\base\InvalidCallException;
use yii\base\InvalidConfigException;
use yii\base\NotSupportedException;
use yii\db\BaseActiveRecord;
use yii\helpers\ArrayHelper;
use yii\helpers\Inflector;
@ -604,4 +605,14 @@ class ActiveRecord extends BaseActiveRecord
return $n;
}
/**
* Destroys the relationship in current model.
*
* This method is not supported by elasticsearch.
*/
public function unlinkAll($name, $delete = false)
{
throw new NotSupportedException('unlinkAll() is not supported by elasticsearch, use unlink() instead.');
}
}

View File

@ -6,7 +6,6 @@ Yii Framework 2 elasticsearch extension Change Log
- Bug #3587: Fixed an issue with storing empty records (cebe)
- Bug #4187: Elasticsearch dynamic scripting is disabled in 1.2.0, so do not use it in query builder (cebe)
- Enh #3520: Added `unlinkAll()`-method to active record to remove all records of a model relation (NmDimas, samdark, cebe)
- Enh #3527: Added `highlight` property to Query and ActiveRecord. (Borales)
- Enh #4048: Added `init` event to `ActiveQuery` classes (qiangxue)
- Enh #4086: changedAttributes of afterSave Event now contain old values (dizews)