Adding fix for Ticket $645; it is now possible to force a separate query (instead of left join) by adding 'external' key to association definition

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3112 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-06-15 14:39:34 +00:00
parent 9144b7a738
commit e0edd33ebd

View file

@ -790,7 +790,7 @@ class DboSource extends DataSource {
switch($type) {
case 'hasOne':
if ($external) {
if ($external || isset($assocData['external'])) {
if (isset($assocData['finderQuery'])) {
return $assocData['finderQuery'];
}
@ -871,7 +871,7 @@ class DboSource extends DataSource {
}
break;
case 'belongsTo':
if ($external) {
if ($external || isset($assocData['external'])) {
$limit = '';
if (isset($assocData['limit'])) {
$limit = $this->limit($assocData['limit'], $queryData['offset']);