ポータルにはRavenDbを使用しています。Question
以下のドキュメントの例:
{
"CreatedOn": "2012-07-12T09:40:44.7514005Z",
"CreatedBy": {
"DisplayName": "Kamil",
},
"Subject": "My q",
"Content": "My q content",
"Tags": [
"myQ"
],
"Answers": {
"$type": "System.Collections.ObjectModel.Collection`1[[QA.Core.Entities.Answer, QA.Core]], mscorlib",
"$values": [
{
"CreatedOn": "2012-07-12T09:42:06.9852492Z",
"CreatedBy": {
"DisplayName": "Kamil",
},
"ModifiedOn": "2012-07-12T09:43:07.8442347Z",
"ModifiedBy": {
"DisplayName": "Kamil",
},
"Content": "My answer.",
"IdNumber": 1,
"Supporters": {
"$type": "System.Collections.ObjectModel.Collection`1[[QA.Core.Entities.User, QA.Core]], mscorlib",
"$values": []
},
"IsOfficial": true,
"AttachmentHeaders": []
}
]
},
"NumberOfViews": 3,
"Supporters": {
"$type": "System.Collections.ObjectModel.Collection`1[[QA.Core.Entities.User, QA.Core]], mscorlib",
"$values": []
},
"NotificationEmails": [],
"AttachmentHeaders": [],
"LastAnswerId": 1
}
質問クラスの大きなリファクタリング名前空間が変更された後。ドキュメントメタデータ(レイヴン内)で、その変更が検出され、問題ありません。しかし、次のようなネストされたコレクションについてはどうでしょうか。
"Supporters": {
"$type": "System.Collections.ObjectModel.Collection`1[[QA.Core.Entities.User, QA.Core]], mscorlib",
"$values": []
},
?そのドキュメントをアプリレベルから取得しようとすると、エラーが発生します。次のように変更すると、問題が解消されます。
"Supporters": [],
しかし、200のドキュメントに対してそのアクションを実行する必要がある場合、それは解決策ではありません。
それを自動的に行う方法はありますか?