You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These all work because of the automatic cleaning that collection2 does. It's true that the insert command is successful, but if you look in mongo, or do a findOne to check out what was saved, nothing invalid is saved. In the first case, alsoThis is stripped out. In the other cases, the values are saved, but only after being converted to strings.
Usually I think this would be the desired behavior, to avoid unnecessary errors being displayed to users, but we could add an option to disable the automatic cleaning if you think it's useful.
Oh, yeah after further investigating into it and also having a look how it reacts with Booleans, other Javascript Types I think it's quite nice to have that.
I'll close this issue then, thanks for explaining.
I noticed that if you have this as the collection 2 definition:
Then you get a true in a lot of (to me) weird cases:
The text was updated successfully, but these errors were encountered: