Description
Hi,
I was trying to save three belongsTo relationships, but for some reason only the first one would go through; While investing it, I dd'ed here https://github.com/cloudcreativity/laravel-json-api/blob/develop/src/Eloquent/AbstractAdapter.php#L370 and saw that it had fetched the relationship before saving, what's the idea behind this?
Eg. when trying to save a client_id on a user, this is the $record being passed to persist:
....{"client_id":1,"client":{"id":1,"currency":"EUR","name":"client-name"}}.
It seems like a redundant fetch from the database?
I also finally found my issue with only some of the relationships being saved, here: https://github.com/cloudcreativity/laravel-json-api/blob/develop/src/Adapter/AbstractResourceAdapter.php#L205
What's the idea behind Camelizing the method-name, when Laravel famously uses snake-case for relationships?
The package is absolutely wonderful, but I'll see if I can get a PR in with some documentation.
Cheers