Skip to content

Boris

My feedback

1 result found

  1. 1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Drivers » C#  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Boris commented  · 

    Hi Kishore,

    Enabling schema validation logging on the server side can be done in following way:
    CreateCollectionOptions.ValidationAction = DocumentValidationAction.Warn;
    (driver/3.0.0/api/MongoDB.Driver/MongoDB.Driver.CreateCollectionOptions.ValidationAction.html#MongoDB_Driver_CreateCollectionOptions_ValidationAction)

    Please find more documentation on this, and how to fetch the server logs here:
    https://www.mongodb.com/docs/manual/core/schema-validation/handle-invalid-documents/#std-label-schema-validation-handle-invalid-docs

    On the driver side, our specifications for all drivers require to raise the errors that are coming for the server. .NET driver follows this requirement.

Feedback and Knowledge Base