SoliDry / api-generator

PHP-code generator for Laravel framework, with complete support of JSON-API data format
MIT License
327 stars 60 forks source link

Error on data=["field1", "field2"] passing as uri parameter to index method #162

Closed arthurkushman closed 5 years ago

arthurkushman commented 5 years ago

The problem is present only for relations, especially for belongsTo

arthurkushman commented 5 years ago

Deeper analysis of belongsTo relations showed that there are foreign key binding on parent table ex.: article entity where topic_id must be stored to link article->topic tables. After slicing parameters we don't have the actual topic_id foreign key in article model instance.

This problem seems to me as bug leaking as slicing fields on model level always a catch.