-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
About asynchronous getters/setters again #4227
Comments
Yeah async setters would be useful. It's more difficult than you think, because the setter would need to resolve before doing |
Would love to see that coming in Mongoose ! |
@maxs15 possibly. Still haven't investigated how we would implement this feature, so uncertain. |
I've written a little plugin to mock async getters/setters until it lands in the core. It uses different properties ( |
I like this plugin but there's a few caveats, we'd also have to integrate this queries, because we also support doing things like |
I would be happy to see that feature. What's the status? |
+1 |
May be we ready for PR? Oh I wait this so long. =) |
Hi what is status on this? Library worked great with mongoose 4. |
@Matzu89 what library? |
Any update on this? |
This would be a great feature to add. |
Resurrecting this old thread since it is still the latest for this issue, and trying to bump it for visibility. For my use case, I have a couple of fields that need to be encrypted with |
I have read the two discussions (#2571 and #517) that relate to this opportunity, and still do not see any reason to abandon it. Why not? Even if Mongoose should maintain compatibility with the ES5, this does not prevent to check that the setter returns to us. Watch this pseudo-code:
So why not? This is a very useful feature, and it will join naturally in existing.
The text was updated successfully, but these errors were encountered: