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
In my API I do need to make some joins in the query to apply my filter logic. However if my joining table has the same field name of my resource table (main table) the joiner table's field replaces the one of main table. This is a Laravel/Eloquent problem, but forces me to add a $query->select('resource_table.*') at least the first time I make a join.
In your demo application you already makes use of resource_table. syntax when adding where to the query, because the same problem would happen.
So my question is: May we have this piece of code directly added to AbstractAdapter?
Actually you do not have in your code any select() function to the query even if sparse fields is given. I got that this is done by neomerx/json-apiEncoder and ResourceObject through your default Encoder - that extends neomerx's one - and our resource Schema.
Thanks!
The text was updated successfully, but these errors were encountered:
Yes think there might be a case for doing something around select, particularly when sparse fieldsets are requested. I'm not sure I can prioritise this at the moment though as there's more than enough other stuff to sort out - but will leave this open so that we can add it in a future version.
Hello guys!
In my API I do need to make some joins in the query to apply my filter logic. However if my joining table has the same field name of my resource table (main table) the joiner table's field replaces the one of main table. This is a Laravel/Eloquent problem, but forces me to add a
$query->select('resource_table.*')
at least the first time I make a join.In your demo application you already makes use of
resource_table.
syntax when addingwhere
to the query, because the same problem would happen.So my question is: May we have this piece of code directly added to
AbstractAdapter
?Actually you do not have in your code any
select()
function to the query even if sparse fields is given. I got that this is done by neomerx/json-apiEncoder
andResourceObject
through your defaultEncoder
- that extends neomerx's one - and our resourceSchema
.Thanks!
The text was updated successfully, but these errors were encountered: