Skip to content

fix: mutating ManyArray should handle duplicates gracefully (with deprecation)#9189

Merged
runspired merged 13 commits intomainfrom
port-9126
Jan 3, 2024
Merged

fix: mutating ManyArray should handle duplicates gracefully (with deprecation)#9189
runspired merged 13 commits intomainfrom
port-9126

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
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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants