Skip to content

Avoid error "All objects must exist on the server" on calling fetchAll() #5950

Closed
@RaschidJFR

Description

@RaschidJFR

Is your feature request related to a problem? Please describe.
When you need to fetch a list of objects which can be managed (or deleted) by other users, you risk getting an error "All objects must exist on the server" if any of those objects no longer exists.

Describe the solution you'd like
Ideally, the call to ParseObject.fetchAll() could ignore nonexistent objects and go on with the rest of the results.

Describe alternatives you've considered
The current way of avoiding this problem is not using fetchAll() but instead creating a new query:

let objectList = [...someObjects];
objectList = await new Parse.Query('Foo')
  .containedIn('objectId', objectList.map(o => o.id))
  .find();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions