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

Clear all fields if $set is not used in update #26

Open
SamVerschueren opened this issue Oct 6, 2015 · 1 comment
Open

Clear all fields if $set is not used in update #26

SamVerschueren opened this issue Oct 6, 2015 · 1 comment

Comments

@SamVerschueren
Copy link
Owner

An update should be done like this

Table.update({id: 1}, {$set: {hello: 'world'}}).exec();

If the user does this

Table.update({id: 1}, {hello: 'world'}).exec();

The current record should be removed and we should insert the new record. Just like mongodb does.

@SamVerschueren SamVerschueren changed the title Clear all fields of $set is not used in update Clear all fields if $set is not used in update Jan 23, 2016
@SamVerschueren
Copy link
Owner Author

It's related to #66. If we find a good way of doing this, these two issues could be fixed in the same way.

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

1 participant