Replies: 2 comments
-
What does your query look like? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I reported an issue (#872) and there is more info there. Thanks for your answer. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have two models,
Employee
andCompany
andEmployee
belongsToCompany
.I want to have a simple datatable listing employees and respective companies. The column definition would be something like:
Relations are being eager loaded and everything works fine like this.
But, say I want to display the company's description, through the
getDescription()
method. If I chainformat(fn ($value, $row) => $row->getDescription())
to format the column's value I get an error saying I'm callinggetDescription()
onnull
.I would expect, since the company name is being shown correctly and search and sorting also work fine, that the
company
relation of each employee would be correctly loaded and set but it is not.Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions