Skip to content

is it possible to set a field back to undefined with cloud code? #4692

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

Closed
jeffreyjackson opened this issue Apr 2, 2018 · 4 comments
Closed

Comments

@jeffreyjackson
Copy link

I was trying to use unset, but unfortunately sets it to NULL. is there a workaround for this? beforeSave trigger is where I'm wanting to implement this. thank you

@JacobJT
Copy link

JacobJT commented Apr 20, 2018

Does object.set('key', undefined); not do the trick?

@flovilmart
Copy link
Contributor

@RahulLanjewar93
Copy link
Contributor

@jeffreyjackson I am having the same issue, using unset is setting it to null in the mongodb itself
@flovilmart is there a workaround for this?

@mtrezza
Copy link
Member

mtrezza commented Jan 25, 2023

@RahulLanjewar93

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

5 participants