Ignore max_id when it's 0 or less in BaseDepository->_selectByBoundaries
- It can cause a conflict when both min_id and max_id = 0 as default values
This commit is contained in:
parent
b3c576b9ce
commit
2324dac4b2
|
@ -87,7 +87,7 @@ abstract class BaseDepository
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($max_id)) {
|
||||
if (isset($max_id) && $max_id > 0) {
|
||||
$boundCondition = DBA::mergeConditions($boundCondition, ['`id` < ?', $max_id]);
|
||||
if (!isset($min_id) && (!isset($params['order']['id']) || $params['order']['id'] === false || $params['order']['id'] === 'ASC')) {
|
||||
$reverseOrder = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user