@@ -500,13 +500,13 @@ protected function mockGetSearchResultWithQuery(array $selectResult): void
500500 {
501501 $ this ->mockSelectWithAggregate (
502502 'select count(*) as aggregate from "test_models" '
503- . "where (( \"query_field \" like '%search_\'string%') or ( \"another_query_field \" like '%search_\'string%')) "
503+ . "where (( \"test_models \" . \" query_field \" like '%search_\'string%') or ( \" test_models \" . \"another_query_field \" like '%search_\'string%')) "
504504 . 'and "test_models"."deleted_at" is null ' ,
505505 );
506506
507507 $ this ->mockSelect (
508- "select * from \"test_models \" where (( \"query_field \" like '%search_\'string%') "
509- . "or ( \"another_query_field \" like '%search_\'string%')) and \"test_models \". \"deleted_at \" is null "
508+ "select * from \"test_models \" where (( \"test_models \" . \" query_field \" like '%search_\'string%') "
509+ . "or ( \"test_models \" . \" another_query_field \" like '%search_\'string%')) and \"test_models \". \"deleted_at \" is null "
510510 . 'order by "id" asc limit 15 offset 0 ' ,
511511 $ selectResult ,
512512 );
@@ -516,15 +516,15 @@ protected function mockGetSearchResultWithCustomQuery(array $selectResult): void
516516 {
517517 $ this ->mockSelectWithAggregate (
518518 'select count(*) as aggregate from "test_models" '
519- . 'where (("query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \') '
520- . 'or ("another_query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \')) '
519+ . 'where (("test_models"." query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \') '
520+ . 'or ("test_models"." another_query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \')) '
521521 . 'and "test_models"."deleted_at" is null ' ,
522522 );
523523
524524 $ this ->mockSelect (
525525 'select * from "test_models" '
526- . 'where (("query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \') '
527- . 'or ("another_query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \')) '
526+ . 'where (("test_models"." query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \') '
527+ . 'or ("test_models"." another_query_field"::text ilike \'% \' || unaccent( \'search_ \'\'string \') || \'% \')) '
528528 . 'and "test_models"."deleted_at" is null order by "id" asc limit 15 offset 0 ' ,
529529 $ selectResult ,
530530 );
@@ -534,9 +534,9 @@ protected function mockGetSearchResultWithRelations(array $selectResult): void
534534 {
535535 $ this ->mockSelectWithAggregate (
536536 'select count(*) as aggregate from "test_models" '
537- . 'where (("query_field" like \'%search_string% \') or exists (select * from "relation_models" '
537+ . 'where (("test_models"." query_field" like \'%search_string% \') or exists (select * from "relation_models" '
538538 . 'where "test_models"."id" = "relation_models"."test_model_id" '
539- . 'and ("another_query_field" like \'%search_string% \'))) and exists (select * from "relation_models" '
539+ . 'and ("relation_models"." another_query_field" like \'%search_string% \'))) and exists (select * from "relation_models" '
540540 . 'where "test_models"."id" = "relation_models"."test_model_id" and "name" = ?) '
541541 . 'and "test_models"."deleted_at" is null ' ,
542542 ['some_value ' ],
@@ -545,10 +545,10 @@ protected function mockGetSearchResultWithRelations(array $selectResult): void
545545 $ this ->mockSelect (
546546 'select "test_models".*, (select "id" from "relation_models" '
547547 . 'where "test_models"."id" = "relation_models"."test_model_id" order by "id" asc limit 1) '
548- . 'as "relation_id" from "test_models" where (("query_field" like \'%search_string% \') '
548+ . 'as "relation_id" from "test_models" where (("test_models"." query_field" like \'%search_string% \') '
549549 . 'or exists (select * from "relation_models" '
550550 . 'where "test_models"."id" = "relation_models"."test_model_id" '
551- . 'and ("another_query_field" like \'%search_string% \'))) and '
551+ . 'and ("relation_models"." another_query_field" like \'%search_string% \'))) and '
552552 . 'exists (select * from "relation_models" where "test_models"."id" = "relation_models"."test_model_id" '
553553 . 'and "name" = ?) and "test_models"."deleted_at" is null '
554554 . 'order by "relation_id" asc, "id" asc limit 15 offset 0 ' ,
0 commit comments