Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@aws-amplify/datastore): fix hasOne delete #8191

Merged
merged 2 commits into from
May 3, 2021

Conversation

iartemiev
Copy link
Member

@iartemiev iartemiev commented Apr 28, 2021

Description of changes

Allow deleting records that have a Has One relation. Perform a cascading delete.

Note: This library bugfix relies on a recent Codegen change, and in order to work correctly, this feature flag needs to be set to true. Starting 5/1 this will be the default CLI/Codegen behavior for new projects.

Issue #, if available

#6560

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
    Relevant documentation is changed or added (and PR referenced) N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@iartemiev iartemiev added the DataStore Related to DataStore category label Apr 28, 2021
@iartemiev iartemiev self-assigned this Apr 28, 2021
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2021

Codecov Report

Merging #8191 (f1faafa) into main (918797e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8191      +/-   ##
==========================================
+ Coverage   76.90%   76.91%   +0.01%     
==========================================
  Files         233      233              
  Lines       15222    15228       +6     
  Branches     2975     2979       +4     
==========================================
+ Hits        11706    11713       +7     
+ Misses       3289     3288       -1     
  Partials      227      227              
Impacted Files Coverage Δ
packages/datastore/__tests__/helpers.ts 100.00% <ø> (ø)
packages/datastore/src/types.ts 81.08% <ø> (ø)
...tastore/src/storage/adapter/AsyncStorageAdapter.ts 78.04% <100.00%> (+0.27%) ⬆️
.../datastore/src/storage/adapter/IndexedDBAdapter.ts 81.76% <100.00%> (+0.15%) ⬆️
...ges/datastore/src/storage/adapter/InMemoryStore.ts 77.27% <0.00%> (+4.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 918797e...f1faafa. Read the comment docs.

Copy link
Contributor

@manueliglesias manueliglesias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 🎉

@github-actions
Copy link

github-actions bot commented May 4, 2022

This pull request 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DataStore Related to DataStore category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants