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
Where a friendship has users and so does groups, and they are linked together through hasMany relationships. When I delete a user, can I make it automatically delete friendships and groups for instance with that user in it?
I find it very annoying code wise such that every time I'm going to delete a user, I have to:
Query all Friendship objects with that user
Delete all Friendship objects with that user
Query all Group objects with that user
Delete all Group objects with that user
Query all Post objects with that user
Delete all Post objects with that user
Delete the user FINALLY
Is there a way to make it to where, they I can just say client.models.User.delete and then it automatically deletes all related data?
Expected behavior
N/A Mentioned above.
Reproduction steps
N/A
Code Snippet
See above
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 12
Mobile Operating System
iOS 17
Mobile Browser
Safari
Mobile Browser Version
N/A
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
api
Backend
None
Environment information
Describe the bug
Not necessarily a bug but more of a question / feature request. If I have relational data like so:
Where a friendship has users and so does groups, and they are linked together through
hasMany
relationships. When I delete a user, can I make it automatically delete friendships and groups for instance with that user in it?I find it very annoying code wise such that every time I'm going to delete a user, I have to:
Friendship
objects with that userFriendship
objects with that userGroup
objects with that userGroup
objects with that userPost
objects with that userPost
objects with that userIs there a way to make it to where, they I can just say
client.models.User.delete
and then it automatically deletes all related data?Expected behavior
N/A Mentioned above.
Reproduction steps
N/A
Code Snippet
See above
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 12
Mobile Operating System
iOS 17
Mobile Browser
Safari
Mobile Browser Version
N/A
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: