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

afterCreate no longer has mirage models #2576

Open
RobbieTheWagner opened this issue Feb 20, 2024 · 2 comments
Open

afterCreate no longer has mirage models #2576

RobbieTheWagner opened this issue Feb 20, 2024 · 2 comments

Comments

@RobbieTheWagner
Copy link

After updating from 3.0.0-alpha.3 to 3.0.2 the parameter to afterCreate seems to no longer be a mirage model. It used to have .update as a method on it, and now it does not.

@SergeAstapov
Copy link
Collaborator

@RobbieTheWagner could you please confirm you have the same version of miragejs? I believe described behavior has nothing to do with ember-cli-mirage and most likely caused by some changes in miragejs

@gmixson
Copy link

gmixson commented Oct 16, 2024

I see this as well using ember-cli-mirage: 3.0.4 and miragejs: 0.1.48.

I'm using neither Ember data models nor mirage models - perhaps that's the issue. I did try creating a mirage model but that didn't seem to make a difference. As a work around I used the server.db.<modelName>.update() function inside the afterCreate.

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

No branches or pull requests

3 participants