Skip to content

Commit de36a46

Browse files
authored
Merge pull request #38 from bakaphp/fix/sort-relations
set previous relationSearchFields value if we dont have rparams
2 parents cef98d8 + 96c2530 commit de36a46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Converter/RequestUriToSql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ protected function prepareCustomSql(array $searchCriteria, Model $modules, strin
529529
*/
530530
protected function prepareParams(array $unparsed): void
531531
{
532-
$this->relationSearchFields = array_key_exists('rparams', $unparsed) ? $this->parseRelationParameters($unparsed['rparams']) : [];
532+
$this->relationSearchFields = array_key_exists('rparams', $unparsed) ? $this->parseRelationParameters($unparsed['rparams']) : $this->relationSearchFields;
533533
$this->customSearchFields = array_key_exists('cparams', $unparsed) ? $this->parseSearchParameters($unparsed['cparams'])['mapped'] : [];
534534
$this->normalSearchFields = array_key_exists('params', $unparsed) ? $this->parseSearchParameters($unparsed['params'])['mapped'] : [];
535535
}

0 commit comments

Comments
 (0)