+ $reverseModels = false;
+
+ if (isset($min_id)) {
+ $boundCondition = DBA::mergeConditions($boundCondition, ['`id` > ?', $min_id]);
+ if (!isset($max_id) && isset($params['order']['id']) && ($params['order']['id'] === true || $params['order']['id'] === 'DESC')) {
+ $reverseModels = true;
+ $params['order']['id'] = 'ASC';
+ }