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
Remove from array[ObjectId] #361
Comments
Don't use splice. me.friends.remove(uid);
me.save(callback); |
That function is beautiful! |
Is there a way to do this to multiple documents as following?
|
Looking for an answer to this same question (above). How do you do this for multiple documents? |
wonderful |
@bnoguchi Hi, I know this is an old thread, but it is the first post on google (and I did find a solution here).
Or:
Also, is there any more correct way of inserting new "friends" instead of (in short, better alternative for push()):
Thanks. |
Re: first question, doesn't matter, up to personal preference Re: 2nd question, better in what way? |
As-in more efficient/faster. |
No, Re: the |
Hello,
How can I remove a ObjectId from a array of ObjectId ?
My model :
The function for deleting the objectId : uid
Thanks for your response.
The text was updated successfully, but these errors were encountered: