gpt4 book ai didi

frameworks - 同步框架 : How to specify the sync order of multiple tables?

转载 作者:行者123 更新时间:2023-12-04 00:59:44 25 4
gpt4 key购买 nike

有谁知道以特定顺序同步多个表的方法。详细地说,父表和子表中都有新创建的数据,它要求父插入发生在子表之前。

最佳答案

每个表的处理顺序取决于其SyncTable的顺序。对象已添加到同步代理的表集合中。

下表在订单表之前添加了客户表。

SyncGroup customerOrderSyncGroup = new SyncGroup("CustomerOrder");

SyncTable customerSyncTable = new SyncTable("Customer");
customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
customerSyncTable.SyncDirection = SyncDirection.DownloadOnly;
customerSyncTable.SyncGroup = customerOrderSyncGroup;
this.Configuration.SyncTables.Add(customerSyncTable);

SyncTable orderSyncTable = new SyncTable("Order");
orderSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
orderSyncTable.SyncDirection = SyncDirection.DownloadOnly;
orderSyncTable.SyncGroup = customerOrderSyncGroup;
this.Configuration.SyncTables.Add(orderSyncTable);

更多信息是 here

关于frameworks - 同步框架 : How to specify the sync order of multiple tables?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2178269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com