-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eager Loading Filter and Search Issues #2058
Comments
Hi, I am also facing same problem - searching and sorting not working for 'Eager Loading'. Thanks |
I have the same problem. The error I got: Exception Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'logistics_providers.deleted_at' in 'where clause' (SQL: select count(*) as aggregate from (select '1' as `row_count` from `orders` left join `logistics_providers` as `logistics_providers_0` on `orders`.`logistics_provider_id` = `logistics_providers_0`.`id` where `logistics_providers`.`deleted_at` is null and LOWER(`logistics_providers_0`.`name`) LIKE %%test%% and `orders`.`deleted_at` is null) count_row_table) The above query should refer to Problem seems come from this commit: 6c7f997#diff-d7663255b88a6aed388d85442e3ec2e0 |
Downgrading to 9.0.1 fixed my issue. |
Thanks for reporting. Reverted the support for self join in relation to this. |
v9.1.1 released, kindly check again. Thanks! |
Hello @yajra, it still not working for me when trying to filter by any rawColumn. |
Hi, The "Self Joins" stopped working (#2051 ), the alias was removed. When do you plan to get this working again? |
@Morinohtar we need to resolve the issue on soft deletes first as it breaks existing apps. Haven't got the chance to check it further though. |
Well, maybe this would work, assuming the PR i did... Adding this new line:
And then replace the
I added this to the fork i used for the PR. |
Yes, that may work. But we need to find a way to identify if the relation uses SoftDeletes trait before applying the delete column. The challenged I think of here was that Laravel automatically appends the delete scope for every query thus it does not uses the table alias that we generated. |
Ok, i will leave that to you then ;) But the working Awesome job, keep up, and tks :) |
Summary of problem or feature request
I'm having issues with search and filters on
company
eager loading relationship.Also, the
company model
has aMorphTo
relationship where filter or search also didn't work.Could someone point me out why it is not working?
Code snippet of problem
System details
Operating System: Windows 10
PHP Version: 7.2
Laravel Version: 5.8
Laravel Datatables Version: Oracle 9.0
The text was updated successfully, but these errors were encountered: