Replies: 3 comments 1 reply
-
|
After some investigations, it looks like a bit more sneaky. The problem is maybe more about the Then i tried to select as I will take time to provide a repository to reproduce this issue |
Beta Was this translation helpful? Give feedback.
-
|
Bug reproduced here : https://github.com/MrYamous/powergrid-livewire-bug-reproducer |
Beta Was this translation helpful? Give feedback.
-
|
I am also having this problem -- datasource has joins, sortField uses field on joined table, table displays fine. On export to CSV, however, order by is issued on field in root model, not on field in joined table, and I get the same error as above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Livewire PowerGrid version
6.3.3
Livewire version
3.5.1
Laravel version
11.40.18
Which PHP version are you using?
PHP 8.2
Which Theme are you using?
Tailwind
Have you published the resource files and customized them? (php artisan vendor:publish)
No
What is the problem?
I have a Table, with some datas from 2 tables
When i order columns from a joined table in the UI, it works fine
When i export the table, with data ordered, a new SQL request is done but with order_by applied on root model and not on joined table
Code snippets
This is request for the datasource (with edited table name) :
select lieu.*, CONCAT(user.nom, " ", user.prenom) as nom_complet fromlieuinner jointablename.usersasuseronlieu.num_agent=user.nameanduser.deleted_atis null wherelieu.libellein ('domicile', 'autre-lieu-prive') order bynom_completasc limit 25 offset 0This is request for the export :
select lieu.*, CONCAT(user.nom, " ", user.prenom) as nom_complet fromlieuinner jointablename.usersasuseronlieu.num_agent=user.nameanduser.deleted_atis null wherelieu.libellein (domicile, autre-lieu-prive) order bylieu.nom_completascNote the difference for order by
And the error :
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lieu.nom_complet' in 'order clause'How do you expect it to work?
Datasource and export should apply
order_bythe same wayPlease confirm (incomplete submissions will not be addressed)
Beta Was this translation helpful? Give feedback.
All reactions