Browse Source

Use inner join instead of a left join.

In some database servers an INNER join performs better than a LEFT join.

Fixes #3979
mark_story 12 years ago
parent
commit
3bdcf7b440
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/AclNode.php

+ 1 - 1
lib/Cake/Model/AclNode.php

@@ -163,7 +163,7 @@ class AclNode extends Model {
 				'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")