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: mutating ManyArray should handle duplicates gracefully (with deprecation) #9189

Merged
merged 13 commits into from
Jan 3, 2024

Conversation

gitKrystan
Copy link
Contributor

@gitKrystan gitKrystan commented Dec 21, 2023

Description

Forward-port of #9126 (see #9119)

Re-enables deduplication of duplicate records added to ManyArrays, but with a deprecation (ember-data:deprecate-many-array-duplicates) as described below:

/**
 * **id: ember-data:deprecate-many-array-duplicates**
 *
 * When the flag is `true` (default), adding duplicate records to a `ManyArray`
 * is deprecated in non-production environments. In production environments,
 * duplicate records added to a `ManyArray` will be deduped and no error will
 * be thrown.
 *
 * When the flag is `false`, an error will be thrown when duplicates are added.
 *
 * @property DEPRECATE_MANY_ARRAY_DUPLICATES
 * @since 5.3
 * @until 6.0
 * @public
 */

Notes for the release

@gitKrystan gitKrystan changed the title port 9126 fix: mutating ManyArray should handle duplicates gracefully (with deprecation) Dec 21, 2023
@gitKrystan gitKrystan added 🎯 canary PR is targeting canary (default) 🏷️ bug This PR primarily fixes a reported issue 🏷️ deprecation labels Dec 21, 2023
@gitKrystan gitKrystan self-assigned this Dec 21, 2023
@runspired runspired merged commit 5abe3c8 into main Jan 3, 2024
20 checks passed
@runspired runspired deleted the port-9126 branch January 3, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 canary PR is targeting canary (default) 🏷️ bug This PR primarily fixes a reported issue 🏷️ deprecation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants