Created
December 6, 2014 06:47
-
-
Save dereuromark/5bfc5c33dfd9b59b8388 to your computer and use it in GitHub Desktop.
mapReduce issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param Event $event | |
* @param Query $query | |
* @return void | |
*/ | |
public function beforeFind(Event $event, Query $query) { | |
$this->encodeBitmaskConditions($query); | |
$field = $this->_config['field']; | |
if (!($mappedField = $this->_config['mappedField'])) { | |
$mappedField = $field; | |
} | |
$mapper = function ($row, $key, $mr) use ($field, $mappedField) { | |
$row->set($mappedField, $this->decodeBitmask($row->get($field))); | |
}; | |
// once this is added, the 7 results are suddently gone (empty array then) | |
//$query->mapReduce($mapper); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment