Open guarriellocristianmichele opened 1 week ago
Okay, so this is actually intentional behaviour!
The package intentionally selects only fields that are actually in use within the table, to avoid deeply nested relations causing issues with load-times/overloading your database.
Which Column/Relationship are you needing to access?
Also just to note, you can use these two methods to either prepend/append a Column to your set of Columns (this is not fully documented/released just yet, but works):
/**
* Prepend columns.
*/
public function prependColumns(): array
{
return [];
}
/**
* Append columns.
*/
public function appendColumns(): array
{
return [];
}
For adding complex relations, you can customise the query in the builder() method to add any relationships that you require, If it's a one-to-one, one-to-many style, then you can use the setAdditionalSelects/addAdditionalSelects (ensuring that you also add in the relevant local/foreign keys), and use the Column as normal.
You can also use a trait that lets you define which relationships you want to add in the configure() method, this is something that will make it into core soon, I just haven't written all of the tests etc just yet!
Do feel free to drop into the official Discord and give me a prod if you need some back/forth etc, as it's normally easier than a diatribe on here!
What happened?
This is my CustomerTable.
I'm attaching the results of the query and the relations of the model.
I'm using Laravel 10.48.14, Livewire 3.5.1, PHP 8.1
How to reproduce the bug
No response
Package Version
3.2.7
PHP Version
8.1.x
Laravel Version
10.48.14
Alpine Version
It's included in the theme so without any sort of reference about what version is being used.
Theme
Tailwind 3.x
Notes
No response
Error Message
No response