是否可以在一对多方案中同步表? [英] Possibility to synchronize tables in a one-to-many scenario?

查看:53
本文介绍了是否可以在一对多方案中同步表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况:SyncProvider A在具有特定主键列的表上运行。 SyncProvider B在另一个表上运行,其中主键列不是提供者A的PK列。换句话说,两个表的PK列
都不匹配。

I've got the following scenario: SyncProvider A operates on a table with a certain primary key column. SyncProvider B operates on another table where the primary key column is other than the Provider A's PK column. With other words, both tables' PK columns don't match.

提供者B的表有另一列(没有键列),可以具有相同类型的值和范围作为提供者A的PK列。但是提供者B表中的这一列没有唯一约束,这意味着该列中的值可以出现多次。

Provider B's table has got another column (no key column) that can have values of the same type and range as Provider A's PK column. But this column in Provider B's table has no unique constraint, meaning that values in that column can appear more than once.

换句话说,在提供者A的表和提供者B的表之间有一个1:n关系。这意味着在同步期间,更新提供者A表中的记录应该导致更新提供者B表中的所有相应记录。

With other words, between Provider A's table and Provider B's table there is a 1:n relation. That means that during synchronization, updating a record in Provider A's table should lead to updating all the corresponding records in Provider B's table.

显然,Sync Framework不支持这样做。许多同步,但不过我正在寻找这个问题的解决方案。你有什么想法解决这个问题吗?

Apparently, Sync Framework doesn't support this one-to-many synchronization, but nevertheless I'm searching a solution for this problem. Do you have any idea for solving this problem?

PS:我知道两个提供商的表应该有相同的主键列,但在我的情况下,这是不可能的。

P.S.: I know that both providers' tables should have the same primary key columns, but in my case this is impossible to reach.

推荐答案

嗨Egon,

正如您所提到的,关系提供商中绝对不支持这种情况。对于一个副本中的行将更新另一侧的多行的情况,我也不确定我能想到一个解决方案。
是什么导致两个副本中的表模式不同?

As you mentioned this is definitely not supported scenario in the relational providers. I am also not sure I can think of a solution off the top of my head for the scenario where a row from one replica will update multiple rows on the other side. What is your scenario that is causing the table schema to be different in the two replicas?


这篇关于是否可以在一对多方案中同步表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆