mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
9144b7a738
commit
e0edd33ebd
1 changed files with 2 additions and 2 deletions
|
@ -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']);
|
||||
|
|
Loading…
Add table
Reference in a new issue