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

discoverEmberDataModels() triggers ember-data:deprecate-early-static deprecation #2441

Closed
pichfl opened this issue Sep 7, 2022 · 4 comments · Fixed by #2542
Closed

discoverEmberDataModels() triggers ember-data:deprecate-early-static deprecation #2441

pichfl opened this issue Sep 7, 2022 · 4 comments · Fixed by #2542

Comments

@pichfl
Copy link

pichfl commented Sep 7, 2022

Using ember-cli-mirage will trigger the following deprecation in a project with [email protected]

DEPRECATION: Accessing schema information on Models without looking up the model via the store is deprecated. Use store.modelFor (or better Snapshots or the store.getSchemaDefinitionService() apis) instead. [deprecation id: ember-data:deprecate-early-static] This will be removed in Ember 5.0.

@kiwi-josh
Copy link

Heres a poc that resolved this deprecation for me: #2444

@nickschot
Copy link

Confirm that this indeed breaks in v5, shows an assertion.
Screenshot 2023-06-10 at 14 31 42

@esbanarango
Copy link

Facing this same error trying to bymp ember-data to 5.0.0
Signal

@andrew-paterson
Copy link

@kiwi-josh's poc only seems to have been merged into v2. Is there a v3 release that addresses this? I'm on v3.0.0-alpha.3 because of the issue with @embroider/macros < v1, as outlined here: #2343.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants