I want to use schema validation to validate my documents in mongo db collections. I applied a schema and the run await this.db.command({ validate: collectionName, full: true });
in my NodeJS app. For example, if there are documents which have fields not listed in the schema, they are counted in nNonCompliantDocuments
. There is also a messageg "Detected one or more documents not compliant with the collection's schema. Check logs for log id 5363500."
. I’m wondering if there is a way to get the invalid (or not compliant) document using nodejs.
Skip to main content
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
MongoDB-scala Codec fromProvider and empty list | 0 | 480 | May 2024 |
Rails Mongoid has_many query not using foreign_key | 1 | 487 | May 2024 |
Darshan Hiranandani : How can I ensure Kotlin Instant is serialized as BsonDateTime instead of BsonString? | 0 | 406 | Jun 2024 |
Exception in monitor thread while connecting to server | 1 | 1.3k | Jul 2024 |
C# Driver serializing enums as ints in aggregation causing issues using LINQ lambdas | 1 | 53 | Feb 6 |