-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[email protected] causes issues #2479
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
Comments
Are you sure there is a Mongoose issue here? I don't see anything breaking in the 4.8.0 changelog |
+1 I had same problem with Thing.schema.post(e, emitEvent(event)) not emitting events in mongoose 4.8.1, downgraded to mongoose 4.7.7 and everything ok. Also, I would suggest adding ghostMode: false to the browsersync config in server/config/express.js as the default. |
Have either of you submitted a bug report to Mongoose yet? |
I did not. I wasn’t sure it was mongoose at fault or not. I’m kind of new to fullstack and not confident I could pull together a stand-alone example of the event emitting not working.
… On Feb 3, 2017, at 9:12 AM, Andrew Koroluk ***@***.***> wrote:
Have either of you submitted a bug report to Mongoose yet?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2479 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJ3IEGSl9UAnuxYHSRoR0-Rv3v8QO0l2ks5rY0PggaJpZM4LxL_B>.
|
From reading this bug report, it seems like there might have been an unintended breaking API change in mongoose 4.8.0 |
I think I was able to replicate the bug, I opened an issue with mongoose: Automattic/mongoose#4955 |
Downgrading to 4.7.9 solved it for me too, but @ernisto's suggestion looks more correct. |
@ernisto do you thing you might submit a Pull Request for your fix? |
+1 for the @ernisto fix |
@Awk34 Yes it would be Great! But I need some time to create Pull Request according to rules and best practices. |
As of `[email protected]` schema events should be registered before the model is compiled fixes angular-fullstack#2479
As of `[email protected]` schema events should be registered before the model is compiled fixes #2479
As of `[email protected]` schema events should be registered before the model is compiled fixes #2479
Please be aware: the following event on thing.events.js does not work:
Thing.schema.post(e, emitEvent(event));
, since Thing.schema.post event is not triggered with [email protected]The text was updated successfully, but these errors were encountered: