You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update some of the fields/attributes in an existing RT index (containing a combination of attr_bigint, field, string, timestamp and bool). As only dirty attributes are updated, Sphinx will zero out some of the bigint, field, timestamp attributes causing data loss.
What's expected?
Attributes that aren't updated should remain untouched.
What do you get instead?
The attributes are lost and valued as 0 (in case of ints/timestamps, and empty string for a field string).
Additional info
Changing function updateInternal in yii2-sphinx\ActiveRecord.php from: $values = $this->getDirtyAttributes();
to $values = $this->getAttributes();
resolves the issue.
Q
A
Yii version
2.0.12
Yii Sphinx version
2.0.8.0
Sphinx server version
SphinxSearch-2.2.11-id64-release (95ae9a6)
PHP version
7.0.10
Operating system
Windows 7
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
Update some of the fields/attributes in an existing RT index (containing a combination of attr_bigint, field, string, timestamp and bool). As only dirty attributes are updated, Sphinx will zero out some of the bigint, field, timestamp attributes causing data loss.
What's expected?
Attributes that aren't updated should remain untouched.
What do you get instead?
The attributes are lost and valued as 0 (in case of ints/timestamps, and empty string for a field string).
Additional info
Changing function updateInternal in yii2-sphinx\ActiveRecord.php from:
$values = $this->getDirtyAttributes();
to
$values = $this->getAttributes();
resolves the issue.
The text was updated successfully, but these errors were encountered: