Mimetis / SyncWinRT

Implementation of the old Sync Framework for Windows Phone, Windows Store apps, iOS and Android (thx to Xamarin)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update error for multiple primary keys tables

georgeenaru opened this issue · comments

Hi,

Thanks for this toolkit, it works fine, except one issue.
When trying to sync tables that have more than one primary keys the "SyncAsync" method throws an error. Below is the error.
To get over it I had to change all my tables with multiple keys to use only one primary key each and it worked.

Error occured during Upload request.
System.ArgumentException
An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Synchronization.Services.RequestParser.ReadIncomingRequestStreamForPost() at Microsoft.Synchronization.Services.RequestParser.ParseIncomingRequest() at Microsoft.Synchronization.Services.SyncService1.ProcessRequestForMessage(Stream messageBody)

Hi George,
If you mean that the table has more than one table in the primary key, then I have already submitted a patch that will allow for a multiple column primary key.
Please review earlier request: Fix handling of multi-column PK in GetChanges
This may address what you require.