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 |
---|---|---|---|
Optimize JSON Output in MongoDB ToJson | 4 | 490 | May 2024 |
Mongo-c-driver version 1.25.1 - memory issues when executing mongoc_cursor_next() | 4 | 336 | Jul 2024 |
cCreation of a database using python and nodejs | 0 | 25 | Aug 2024 |
implementation of org.mongodb:mongodb-driver-kotlin-coroutine:5.2.0 not workig in android | 0 | 62 | Oct 2024 |
Projection with conditions | 0 | 24 | Jan 15 |