問題タブ [mongo-collection]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - mongodb deleteMany{()} がクエリ/空のクエリなしで実行されるとどうなりますか?
collection.deleteMany{()} がクエリや空の文字列なしで Java で実行されるとどうなるかを尋ねたかったのです。実行に失敗しますか (何も削除されないため)、またはデータベース全体が削除されますか?
mongodb - 再帰的にネストされたドキュメントの MongoDB JsonSchema を定義する方法
再帰的な性質を持つ Document を検証するために MongoDB JSONSchema を定義する方法はありますか。
例:私のユースケースは、コメントにネストされたコメントを含めることができるということです。
{ "$jsonSchema": { "bsonType": "object", "properties": { "comment": { "bsonType": "array", "uniqueItems": true, "additionalProperties": false, "items": { "bsonType": "object", "properties": { "user": { "bsonType": "string" }, "message": { "bsonType": "bool" }, "comment": { "bsonType": "??? どうすればこれを再帰型に変換できますか" } } } } } }
これに $jsonSchema を定義するにはどうすればよいですか。助けてください