1 node.entity.inc | protected NodeStorageController::buildQuery($ids, $conditions = array(), $revision_id = FALSE) |
Overrides DefaultEntityController::buildQuery().
Overrides DefaultEntityController::buildQuery
File
- core/
modules/ node/ node.entity.inc, line 576 - Entity controller and class for nodes.
Class
- NodeStorageController
- Controller class for nodes.
Code
protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) {
// Ensure that uid is taken from the {node} table,
// alias timestamp to revision_timestamp and add revision_uid.
$query = parent::buildQuery($ids, $conditions, $revision_id);
$fields = &$query->getFields();
unset($fields['timestamp']);
$query->addField('revision', 'timestamp', 'revision_timestamp');
$fields['uid']['table'] = 'base';
$query->addField('revision', 'uid', 'revision_uid');
return $query;
}