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

Order of events inconsistent #1894

Closed
allouis opened this issue Sep 17, 2018 · 2 comments
Closed

Order of events inconsistent #1894

allouis opened this issue Sep 17, 2018 · 2 comments

Comments

@allouis
Copy link

allouis commented Sep 17, 2018

Introduction

Currently when creating a new model, the order of events before the insert is saving, creating but after the insert it's created, saved. I initially thought this was a bug, but in your docs the order isn't specified.

Is this intentional behavior?

@ricardograca
Copy link
Member

ricardograca commented Sep 17, 2018

... but in your docs the order isn't specified.

It kind of is: http://bookshelfjs.org/#Model-instance-save

Fires
"saving"
"creating"
"updating"
"created"
"updated"
"saved"

The idea here is that saving and saved wrap the other more specific events.

Also check out related: #1142.

@allouis
Copy link
Author

allouis commented Sep 17, 2018

Ah I didn't realise that was an ordered list.

Okay - thanks for the linked issue and getting back to me ☺️

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

No branches or pull requests

2 participants