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

Pass owner instead of registry to ember-data's setupContainer #1387

Merged
merged 1 commit into from
May 30, 2023

Conversation

anehx
Copy link
Contributor

@anehx anehx commented May 12, 2023

The setupContainer function of ember-data expects an application instance to be passed - in this case that is the faked owner object that we create when using a custom resolver in tests.

This behaviour previously worked because ember-data supported the usage of legacy function optionsForType which exists on the registry object. However, they removed that legacy fallback in v4 and replaced it with registerOptionsForType which does not exist on the registry but only on the owner.

Resolves #1386

The `setupContainer` function of `ember-data` expects an application
instance to be passed - in this case that is the faked owner object that
we create when using a custom resolver in tests.

This behaviour previously worked because `ember-data` supported the
usage of legacy function `optionsForType` which exists on the `registry`
object. However, they removed that legacy fallback in v4 and replaced it
with `registerOptionsForType` which does not exist on the registry but
only on the owner.

Resolves emberjs#1386
@MelSumner MelSumner added the v3 label May 30, 2023
@MelSumner MelSumner merged commit 2bee56c into emberjs:master May 30, 2023
13 checks passed
@MelSumner MelSumner changed the title Pass owner instead of registry to ember-data's setupContainer Bug: Pass owner instead of registry to ember-data's setupContainer May 31, 2023
@MelSumner MelSumner changed the title Bug: Pass owner instead of registry to ember-data's setupContainer Pass owner instead of registry to ember-data's setupContainer May 31, 2023
@MelSumner MelSumner added bug v3 and removed v3 labels May 31, 2023
@anehx anehx deleted the fix-setup-container-usage branch May 31, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup context fails when using ember-data v4 and a custom resolver
3 participants