To me it looks like the NavigationProperty for customer is listed correctly.
With that setup Tinkerwell is able to relate a given Contact to a related Customer via pivot Contactable
use App\Models\Contact;
use App\Models\Contactable;
use App\Models\Customer;
$contact = Contact::find(15);
$contactables = $contact->contactables;
$contactables->first()->customer;
But when I try to emit the odata request …/odata/Contacts(15)?expand=contactables($expand=customer) the customer property always stays null.
Is this a bug? Where can I trace down the $expand?
Hi @27pchrisl,
on finding an odata-ish solution for my $expand pivot problem I created a custom
BelongsTo
relation on my pivot modelContactable
likeThe
$metadata
entry for the pivot table looks likeTo me it looks like the
NavigationProperty
forcustomer
is listed correctly.With that setup Tinkerwell is able to relate a given
Contact
to a relatedCustomer
via pivotContactable
But when I try to emit the odata request
…/odata/Contacts(15)?expand=contactables($expand=customer)
thecustomer
property always staysnull
.Is this a bug? Where can I trace down the
$expand
?