Closed mcmuchenje closed 2 years ago
You can update a record only by its ID.
If you want to perform update ussing a different field, you can query first the record and then extract its id and send it in the update request.
In future we will add support for bulk update/create/delete which will allow providing a filter query, but that will be after the users and profiles refactoring (you could also check this discussion - https://github.com/pocketbase/pocketbase/discussions/545).
This should not be marked as complete IMHO. Keeping it open makes sense in this case.
@hood bulk update/create/delete will be handled together with the data import feature. You could subscribe to issue #48.
is this implemented yet?
@0x1337z If you are asking for updating a record using a WHERE
/filter clause with the Web APIs, then No and there are no longer plans for this as it comes with too many edge cases. If you really need it you'll have to register your own route and operate with db helpers (using Go or the JSVM).
If you are asking for the bulk update/create/delete actions, then this is already implemented as part of the ongoing refactoring but again the individual operation would be similar to the existing APIs, aka. they require to provide the id of the record to update/delete.
Trying to update a record in a collection where i match a field which is not the RECORD_ID
not sure if this is possible is the javascript-sdk
Kindly requesting help
Big fan of the project by the way