question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataStore Delete - Failed to execute 'index' on 'IDBObjectStore'

See original GitHub issue

Describe the bug When I try to delete an item in DataStore which belongs to a 1 to many relationship I get the 'failed to execute ‘index’ on ‘IDBObjectStore’ error. I noticed in another issue DataStore has a problem with deleting such a relationship here… #https://github.com/aws-amplify/amplify-js/issues/5088

Expected behavior I expect the the user to be able to delete a rental unit

Code Snippet My schema looks like this…a user has many rental units

type User
  @model
  @auth(rules: [{ allow: owner, ownerField: "id" }]) {
  id: ID!
  userType: UserType!
  username: String!
  email: String!
  rentalUnits: [RentalUnit] @connection(keyName: "OwnerUnits", fields: ["id"])
}

type RentalUnit
  @model
  @key(name: "OwnerUnits", fields: ["ownerID"])
  @auth(rules: [{ allow: owner, ownerField: "ownerID" }]) {
  id: ID!
  ownerID: ID!
  unitType: UnitType!
}

Thank you for any suggestions.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
myfairsharecommented, Nov 3, 2020

Yes please, thanks again!

0reactions
github-actions[bot]commented, Nov 4, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot delete data from datastore in aws-amplify
Whenever I try to delete data from any of my table it gives the error. DOMException: Failed to execute 'index' on 'IDBObjectStore': The ......
Read more >
IDBObjectStore.clear() - Web APIs - MDN Web Docs
Clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object ......
Read more >
Method: projects.indexes.delete - Google Cloud
Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of...
Read more >
Working with IndexedDB - web.dev
This API uses indexes to enable high performance searches of this data. ... If one of the actions within a transaction fails, none...
Read more >
How To Delete Object Using Datastore, Query (With 'Id') On ...
Run this query to identify the datastore ID in the vCenter Server database: select ... Unhandled Runtime Error NotFoundError: Failed to execute 'index'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found