Table column loses data when sorting by relationship
I have the following relation
Booking
-> HasMany -> Dayparts
where Dayparts
has a field date
. I want to sort courses by the first child in Dayparts
and while the code for that sorts the items in the table correctly, the data in the sorted column in the table just disappears. When the table is not sorted, the date is showing correctly. Any idea what I'm doing wrong? This is the table column in the BookingResource
:
I tried changing 'dayparts.0.date'
to 'date'
as well, but that changes nothing.1 Reply
I've got it working by using the following code:
Booking model:
I'm curious to know if this is an acceptable solution or if there are better solutions for this problem.