<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Replicating self-referencing tables and circular foreign keys with Microsoft Sync Framework</title>
	<atom:link href="http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 13:27:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: bdrajer</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-2637</link>
		<dc:creator>bdrajer</dc:creator>
		<pubDate>Wed, 21 Mar 2012 14:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-2637</guid>
		<description>Hi Nic,

The solution was implemented with Sync Framework 2.1. The sys_ReplicationTombstone is a common tombstone table for the whole database. It has columns for table name, deletion date and primary key value (or values) for the deleted row.

As for the link to the file, it was the wrong link, sorry (don&#039;t know what happened to it, I&#039;m sure I checked it when I posted it). Please find the updated link above.

I can&#039;t say if there&#039;s a better solution for this problem since I haven&#039;t been very active lately as far as Sync Framework is concerned. The whole thing is starting to look like an open source project that died, so I&#039;m running with what I have and looking for alternatives - of which a centralized database looks like the most promising one :).

Best regards!</description>
		<content:encoded><![CDATA[<p>Hi Nic,</p>
<p>The solution was implemented with Sync Framework 2.1. The sys_ReplicationTombstone is a common tombstone table for the whole database. It has columns for table name, deletion date and primary key value (or values) for the deleted row.</p>
<p>As for the link to the file, it was the wrong link, sorry (don&#8217;t know what happened to it, I&#8217;m sure I checked it when I posted it). Please find the updated link above.</p>
<p>I can&#8217;t say if there&#8217;s a better solution for this problem since I haven&#8217;t been very active lately as far as Sync Framework is concerned. The whole thing is starting to look like an open source project that died, so I&#8217;m running with what I have and looking for alternatives &#8211; of which a centralized database looks like the most promising one <img src='http://www.8bit.rs/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Best regards!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nic</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-2620</link>
		<dc:creator>Nic</dc:creator>
		<pubDate>Mon, 19 Mar 2012 14:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-2620</guid>
		<description>Hi 

I seem to have run into the same issue with the Sync Framework on self-referencing tables and this article is basically the only resource available with a solution to the problem (besides the others on Microsoft forum - but i have the same concerns, as you have written in the first paragraph).

I have attempted to implement your solution (changing sync adapter) but there are a few things im not sure of:
1. What sync framework version is the solution in this article for?
2. What is sys_ReplicationTombstone?
3. Just to make sure the example in the article and the link to the client sync provider are two separate solutions (i dont quite understand what you have done in the client provider though)?
3. Is there an official updated solution to this problem (i havent found one on the Microsoft forums yet)?</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>I seem to have run into the same issue with the Sync Framework on self-referencing tables and this article is basically the only resource available with a solution to the problem (besides the others on Microsoft forum &#8211; but i have the same concerns, as you have written in the first paragraph).</p>
<p>I have attempted to implement your solution (changing sync adapter) but there are a few things im not sure of:<br />
1. What sync framework version is the solution in this article for?<br />
2. What is sys_ReplicationTombstone?<br />
3. Just to make sure the example in the article and the link to the client sync provider are two separate solutions (i dont quite understand what you have done in the client provider though)?<br />
3. Is there an official updated solution to this problem (i havent found one on the Microsoft forums yet)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bdrajer</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-877</link>
		<dc:creator>bdrajer</dc:creator>
		<pubDate>Wed, 24 Nov 2010 13:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-877</guid>
		<description>Hi Mickaël,

Sorry for the delay. It took some time but I managed to slap up an example source file. It&#039;s somewhat different from the code shown above (a bit more complicated), but hopefully it will help you get around. See the update at the end of the post.</description>
		<content:encoded><![CDATA[<p>Hi Mickaël,</p>
<p>Sorry for the delay. It took some time but I managed to slap up an example source file. It&#8217;s somewhat different from the code shown above (a bit more complicated), but hopefully it will help you get around. See the update at the end of the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mickaël</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-866</link>
		<dc:creator>Mickaël</dc:creator>
		<pubDate>Thu, 18 Nov 2010 15:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-866</guid>
		<description>Hi,

I&#039;m trying to create a poc of your idea. On the second adapter, you only have two commands ?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m trying to create a poc of your idea. On the second adapter, you only have two commands ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bdrajer</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-865</link>
		<dc:creator>bdrajer</dc:creator>
		<pubDate>Thu, 18 Nov 2010 10:28:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-865</guid>
		<description>Hi,

I don&#039;t have a standalone example for this, it&#039;s an excerpt from a big implementation, sorry... But if you can tell me what exactly is the problem, I may be able to help.

Here&#039;s an idea that could be useful: the code I have shown above was written in the same manner as what is generated by the Local Database Cache designer (which is built into the Visual Studio). If you add a Local Database Cache item to a project, point it to a database and select a couple of tables from it, it will generate (in its *.Designer.cs file) code that is very similar to the one in my post. But, where the designer produces a single sync adapter for one table (and only for one-way replication), my solution uses two - one &quot;normal&quot; and one for the second pass replication. Look at the designer-generated InitializeSyncAdapters() method, it is responsible for creating adapters and adding them to the internal adapters collection. Modify this code so that it instantiates our &quot;normal&quot; adapter instead of the of the generated one, and add the second-pass one at the end. In this way, the normal adapter will replicate all fields except the circular-referencing ones, and the second pass adapter will come at the end and update what&#039;s missing. (Of course, if you modify generated code and use the designer, you&#039;ll lose your changes - so copy the code somewhere else, you may have to reconstruct the generated class a bit to be able do this).

Hope this makes any sense... It&#039;s not a trivial task because there may be a lot of code to be written, but the code itself is not too complicated (you could modify the generated code or write your own generator for it), so it&#039;s not too hard either.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I don&#8217;t have a standalone example for this, it&#8217;s an excerpt from a big implementation, sorry&#8230; But if you can tell me what exactly is the problem, I may be able to help.</p>
<p>Here&#8217;s an idea that could be useful: the code I have shown above was written in the same manner as what is generated by the Local Database Cache designer (which is built into the Visual Studio). If you add a Local Database Cache item to a project, point it to a database and select a couple of tables from it, it will generate (in its *.Designer.cs file) code that is very similar to the one in my post. But, where the designer produces a single sync adapter for one table (and only for one-way replication), my solution uses two &#8211; one &#8220;normal&#8221; and one for the second pass replication. Look at the designer-generated InitializeSyncAdapters() method, it is responsible for creating adapters and adding them to the internal adapters collection. Modify this code so that it instantiates our &#8220;normal&#8221; adapter instead of the of the generated one, and add the second-pass one at the end. In this way, the normal adapter will replicate all fields except the circular-referencing ones, and the second pass adapter will come at the end and update what&#8217;s missing. (Of course, if you modify generated code and use the designer, you&#8217;ll lose your changes &#8211; so copy the code somewhere else, you may have to reconstruct the generated class a bit to be able do this).</p>
<p>Hope this makes any sense&#8230; It&#8217;s not a trivial task because there may be a lot of code to be written, but the code itself is not too complicated (you could modify the generated code or write your own generator for it), so it&#8217;s not too hard either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mickaël</title>
		<link>http://www.8bit.rs/blog/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/comment-page-1/#comment-864</link>
		<dc:creator>Mickaël</dc:creator>
		<pubDate>Thu, 18 Nov 2010 09:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.8bit.rs/blog/index.php/2009/12/replicating-self-referencing-tables-and-circular-foreign-keys-with-microsoft-sync-framework/#comment-864</guid>
		<description>I have the same problem but I don&#039;t understand how to integrate your solution in my development. Can you share a sample please ?

Thanks</description>
		<content:encoded><![CDATA[<p>I have the same problem but I don&#8217;t understand how to integrate your solution in my development. Can you share a sample please ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

