public function MongoDbEntityLoader::execute in MongoDB 7
Perform the load.
Return value
$this
Throws
\MongoConnectionException
File
- mongodb_field_storage/
mongodb_field_storage.module, line 615 - Implementation of the field storage API for MongoDB.
Class
Code
public function execute() {
$entities = array();
if ($this->ids) {
$this->conditions['_id']['$in'] = array_map('intval', $this->ids);
foreach ($this->ids as $id) {
$entities[$id] = FALSE;
}
}
foreach (mongodb_collection('fields_current', $this->entityType)
->find($this->conditions) as $result) {
$entities[$result['_id']] = (object) $result;
}
$this->result = array_filter($entities);
return $this;
}