lib/Cake/Model/Datasource/DboSource.php 1 location
|
@@ 1524-1526 (lines=3) @@
|
| 1521 |
|
if ($external || (in_array($type, array('hasOne', 'belongsTo')) && $assocData['fields'] !== false)) { |
| 1522 |
|
$fields = $this->fields($linkModel, $association, $assocData['fields']); |
| 1523 |
|
} |
| 1524 |
|
if (empty($assocData['offset']) && !empty($assocData['page'])) { |
| 1525 |
|
$assocData['offset'] = ($assocData['page'] - 1) * $assocData['limit']; |
| 1526 |
|
} |
| 1527 |
|
|
| 1528 |
|
switch ($type) { |
| 1529 |
|
case 'hasOne': |
lib/Cake/Model/Model.php 1 location
|
@@ 2942-2944 (lines=3) @@
|
| 2939 |
|
$query['page'] = 1; |
| 2940 |
|
} |
| 2941 |
|
|
| 2942 |
|
if ($query['page'] > 1 && !empty($query['limit'])) { |
| 2943 |
|
$query['offset'] = ($query['page'] - 1) * $query['limit']; |
| 2944 |
|
} |
| 2945 |
|
|
| 2946 |
|
if ($query['order'] === null && $this->order !== null) { |
| 2947 |
|
$query['order'] = $this->order; |