diff --git a/SPEntitySyncingClient/SyncStrategyV1.cs b/SPEntitySyncingClient/SyncStrategyV1.cs index 4a66e28..fe25496 100644 --- a/SPEntitySyncingClient/SyncStrategyV1.cs +++ b/SPEntitySyncingClient/SyncStrategyV1.cs @@ -144,17 +144,23 @@ public override bool UpdateLocalDatabase(ExchangeData exData) //(List(); - //Setting value from the server to this ID (real entity that must belong to that id) - tran.InsertDataBlockWithFixedAddress(_entitySync.GetEntityContentTable, rowLocalEntity.Value, opr.SerializedObject); - + _entitySync.ptrContent = null; + //New GeneratedID must be stored for the new sync ((ISyncEntity)oldEntity).Id = opr.ExternalId; //Theoretically on this place can be called a user-function to get another ID type - ((ISyncEntity)oldEntity).SyncTimestamp = ++now; //must be returned back, overriding SyncTimeStamp - + ((ISyncEntity)oldEntity).SyncTimestamp = ++now; //must be returned back, overriding SyncTimeStamp + _entitySync.OnInsertEntity(oldEntity, default(T), DBreeze.Utils.CustomSerializator.ByteArraySerializator(oldEntity), opr.InternalId); InsertIndex4Sync(tran, _entitySync.entityTable, oldEntity, _entitySync.ptrContent, default(T)); + + //Setting value from the server for the existing ID (real entity that must belong to that id) + _entitySync.ptrContent = rowLocalEntity.Value; + + _entitySync.OnInsertEntity((T)DBreeze.Utils.CustomSerializator.ByteArrayDeSerializator(opr.SerializedObject, typeof(T)), default(T), + opr.SerializedObject, 0); + reRunSync = true; } } diff --git a/_Deployment/EntitySyncing.nuspec b/_Deployment/EntitySyncing.nuspec index 570a2ba..30a7988 100644 --- a/_Deployment/EntitySyncing.nuspec +++ b/_Deployment/EntitySyncing.nuspec @@ -2,7 +2,7 @@ EntitySyncingServer - 1.004.2020.1208 + 1.005.2020.1209 EntitySyncingServer hhblaze@gmail.com https://tiesky.com diff --git a/_Deployment/EntitySyncingClient.1.4.2020.1208.nupkg b/_Deployment/EntitySyncingClient.1.4.2020.1208.nupkg deleted file mode 100644 index 885e10c..0000000 Binary files a/_Deployment/EntitySyncingClient.1.4.2020.1208.nupkg and /dev/null differ diff --git a/_Deployment/EntitySyncingClient.1.5.2020.1209.nupkg b/_Deployment/EntitySyncingClient.1.5.2020.1209.nupkg new file mode 100644 index 0000000..96d6b49 Binary files /dev/null and b/_Deployment/EntitySyncingClient.1.5.2020.1209.nupkg differ diff --git a/_Deployment/EntitySyncingClient.nuspec b/_Deployment/EntitySyncingClient.nuspec index 699dc46..939f699 100644 --- a/_Deployment/EntitySyncingClient.nuspec +++ b/_Deployment/EntitySyncingClient.nuspec @@ -2,7 +2,7 @@ EntitySyncingClient - 1.004.2020.1208 + 1.005.2020.1209 EntitySyncingClient hhblaze@gmail.com https://tiesky.com diff --git a/_Deployment/EntitySyncingServer.1.4.2020.1208.nupkg b/_Deployment/EntitySyncingServer.1.5.2020.1209.nupkg similarity index 52% rename from _Deployment/EntitySyncingServer.1.4.2020.1208.nupkg rename to _Deployment/EntitySyncingServer.1.5.2020.1209.nupkg index 8e937eb..7a503e0 100644 Binary files a/_Deployment/EntitySyncingServer.1.4.2020.1208.nupkg and b/_Deployment/EntitySyncingServer.1.5.2020.1209.nupkg differ