Skip to content
Permalink
Browse files

Use inner join instead of a left join.

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 3bdcf7b440febde90c3eb5d0260716cba70847df
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/AclNode.php
@@ -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")

0 comments on commit 3bdcf7b

Please sign in to comment.
You can’t perform that action at this time.