livewire-datatables icon indicating copy to clipboard operation
livewire-datatables copied to clipboard

Exportable not loading relationships

Open richardalain83 opened this issue 2 years ago • 3 comments

Hi, i'm using the exportable property but if my model has relationships, when I click on the Export button, I receive an SQL error, column not found and after investigating, i've found that my relationships are not loaded by a left join.. How can I load my relationships within the exportable?

Thanks

I'm using v 0.8.0

richardalain83 avatar Apr 18 '22 02:04 richardalain83

I can confirm this also happens with 0.9.4

underdpt avatar Apr 27 '22 15:04 underdpt

I also have that problem: have you had a solution? ALso I have found that when I have a relasionship in a table, the hide/unhie columns is not working. I am using sqlsrv Thanks for any pointers.

nathcast avatar Jul 14 '22 17:07 nathcast

This also happens in 0.10.1

The relationships without explicit joins works fine in the display using eloquent relationships.

It only breaks when it tries to build the query for export - the query it builds has the joined column names e.g table2.fieldname but it is selecting only from table1

If I add the left joins in builder, then it works fine.

Would be great to just be able to export using the same builder without explicit left joins

nileshd avatar May 19 '23 05:05 nileshd