You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's probably in there because if hydrating a relationship on a relationship endpoint, it would need to sync the relationship. However things are starting to get confusing as to what should be hydrated where.
Probably need to make it that has-many relationships are always hydrated in related methods rather than relationship methods. So when support for relationship endpoints is properly added, the Eloquent controller would always expect to call hydrateRelatedTags rather than hydrateTagsRelationship.
This line:
https://github.com/cloudcreativity/laravel-json-api/blob/master/src/Hydrator/EloquentHydrator.php#L160
Does not work, because on a create request the model does not yet have a key (as it has not been saved at this point).
I suspect this line is not meant to be in here, because hydration of a has-many relationship actually happens here:
https://github.com/cloudcreativity/laravel-json-api/blob/master/src/Hydrator/EloquentHydrator.php#L187
The text was updated successfully, but these errors were encountered: