我目前正在设置 SQL 复制以将我们的 Raven DB 文档复制到 SQL 中以用于报告目的。到目前为止,一切都运行良好。但是,我现在正在尝试保存一个包含一周中几天的数组的文档。
这是文档在 Raven 中的外观:
{
"ClientId": "clients/385",
"Description": "Test",
"IsOneOff": false,
"RecursEveryWeeks": 1,
"StartDate": "2013-03-19T00:00:00.0000000",
"TaskStartTime": "12:00:00",
"TaskDuration": 120,
"TaskEndTime": "14:00:00",
"AdditionalResources": false,
"AdditionalVisitType": "TestType",
"BillableTo": "Private",
"RecurrenceEndDate": "2013-04-30T00:00:00.0000000",
"DaysOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Friday",
"Saturday"
]
}
在 SQL 复制中,我做了以下事情:
sqlReplicate("AdditionalVisit", "AdditionalVisitId", {
ClientId: this.ClientId,
Description: this.Description,
IsOneOff: this.IsOneOff,
RecursEveryWeeks: this.RecursEveryWeeks,
StartDate: this.StartDate,
TaskStartTime: this.TaskStartTime,
TaskDuration: this.TaskDuration,
TaskEndTime: this.TaskEndTime,
AdditionalResources: this.AdditionalResources,
AdditionalVisitType: this.AdditionalVisitType,
BillableTo: this.BillableTo,
RecurrenceEndDate: this.RecurrenceEndDate,
DaysOfWeek: this.DaysOfWeek
});
当我将 DaysOfWeek 排除在 SQL 复制之外时,所有这些都可以正常工作,但是当我离开时会导致服务器崩溃。
这应该如何在 SQL 复制中完成,以便将数组中的所有内容保存到 SQL 中的 DaysOfWeek 列?