locked
Sync Framework v2 CTP2 - ConstraintName for UniqueConstraint is ignored; ForeignConstraints are not created on the client side RRS feed

  • Question

  • I have added some UniqueConstraints and some ForeignConstraints to my SyncSchema. Both do not work entirely as I would have expected:

    1. A unique constraint added to the remote provider is automatically created on the client database during CreatingSchema In contrast, a foreignconstraint added to the remote provider is not automatically created on the client. Currently I enumerate through the foreignconstraint collection during CreatingSchema and add a similar constraint to the local provider. Is this how it is meant to be?

    2. The ConstraintName of a UniqueConstraint is ignored, it is created with something like 'UQ_xxx'. In contrast the constraintname of a foreignkeyConstraint does work

    Regards

    Uwe
    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:34 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, September 3, 2009 3:51 PM

Answers

  • Uwe,

    By default, we do not transfer FK constraints although we do give you the ability to transfer schema objects yourself in an effort to bridge this gap.  We had to draw the line somewhere in terms of what we transferred and your feedback is valid insomuch that creating FK constraints on the client is common enough to where is justifiably should have been included.  Thanks for your feedback.  This request has been added to the list of customer requests considered during vNext planning.  For a how to on transferring schema changes, please see the following link:

    http://msdn.microsoft.com/en-us/library/bb726037.aspx

     

     


    Sean Kelley Senior Program Manager Microsoft
    Thursday, September 3, 2009 9:46 PM
    Moderator

All replies

  • Uwe,

    By default, we do not transfer FK constraints although we do give you the ability to transfer schema objects yourself in an effort to bridge this gap.  We had to draw the line somewhere in terms of what we transferred and your feedback is valid insomuch that creating FK constraints on the client is common enough to where is justifiably should have been included.  Thanks for your feedback.  This request has been added to the list of customer requests considered during vNext planning.  For a how to on transferring schema changes, please see the following link:

    http://msdn.microsoft.com/en-us/library/bb726037.aspx

     

     


    Sean Kelley Senior Program Manager Microsoft
    Thursday, September 3, 2009 9:46 PM
    Moderator
  • Sean,

    thanks for your reply. I agree that it is not much work to add the FK constraints on the client side. I have created a small foreach loop that does just that. It would be even less code if some schema object were derived from specific objects or all constructor overloads would work :-) (please see my other post Sync Framework v2 CTP2 - A few questions regarding the schema objects ).

    Could you comment on top 2. above? Is  this a bug?

    Thanks for your help!

    Regards

    Uwe
    Friday, September 4, 2009 7:39 AM