Skip to content

Commit

Permalink
Use inner join instead of a left join.
Browse files Browse the repository at this point in the history
In some database servers an INNER join performs better than a LEFT join.

Fixes #3979
  • Loading branch information
markstory committed Aug 13, 2013
1 parent 6ce10b2 commit 3bdcf7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/AclNode.php
Expand Up @@ -163,7 +163,7 @@ public function node($ref = null) {
'joins' => array(array(
'table' => $table,
'alias' => "{$type}0",
'type' => 'LEFT',
'type' => 'INNER',
'conditions' => array(
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}0.lft"),
$db->name("{$type}.rght") . ' >= ' . $db->name("{$type}0.rght")
Expand Down

0 comments on commit 3bdcf7b

Please sign in to comment.