I am using the VS2008 Local Data Cache tool to synchronize a SqlServer 2008 Db with a local SQL CE 3.5. At the server I have a table with a PK with datatype uniqueIdentifier
and defaultvalue newID()
. Upon initial synchronization through the Local Data Cache the DB it creates does not copy the default value for this column
(as described here: http://msdn.microsoft.com/en-us/library/bb726037%28v=SQL.105%29.aspx, See "..the following constraints are not copied to the client: FOREIGN KEY constraints, UNIQUE constraints, and DEFAULT constraints...")
I have found a similar question here: MS Sync Framework: Table schema not copied to local db.
But when I tried to implement the solution, I found that the CreatingSchema event for the clientSyncProvider of my Local Data Cache partial class does not fire.
How come? How do I change the schema for a local Data Cache?
Thanks for any ideas you can come up with.