No record found for id '${id}'
RaduGrama opened this issue · 4 comments
Run code like service('abc').patch(1, values)
fails with the error above. It looks like in line 263 the test items.length === 1
returns false because items
has a data
field that has a length
.
In release 4.0.0 there was an const items = page.data;
statement a few lines above, but it's gone starting with 5.0.0 and both 5.0.0 and 5.0.1 exhibit this issue.
Do you have more information about your setup? This simple case is being tested and should be working.
If you have a look at the migration guide you can see that the query
will now be included when trying to look up the record. If you do not want that you will have to clean up the query in a hook.
Running into the same issue. Fails in the same spot. items.data
has the returned array from db but items.length
returns false.
I'm not sure how to clean up the query in a hook. There is no query that I'm sending with this call. In my case: return context.app.service('api/teams').patch(context.id, { 'is_active' : false})
I'm having the same issue as well. In my case, it only happens if {paginate: {default: n}}
is in the options for the service. I'll try to follow up with a small test case.
Yep, that was it. Fixed in v5.0.3