-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
Is your feature request related to a problem? Please describe.
When I create an instance of a class in Realm studio, all nullable fields I don't fill in are automatically filled in with null value (instead of not filling it). It's a lot of noise when you navigate in Mongo Compass
Describe the solution you'd like
Don't set null fields and have a way to unset a field in the table edition
Describe alternatives you've considered
Script to delete null properties (probably not optimised)
const collectionNames = db.getCollectionNames(); for (const name of collectionNames) { var coll = db.getCollection(name); var cursor = coll.find(); while (cursor.hasNext()) { var doc = cursor.next(); var keys = {}; var hasNull = false; for (var x in doc) { if (x != "_id" && doc[x] == null) { keys[x] = 1; hasNull = true; } } if (hasNull) { coll.updateOne({ _id: doc._id }, { $unset: keys }); } } }