Replies: 8 comments 15 replies
-
disable cascade, I guess |
Beta Was this translation helpful? Give feedback.
-
Hi We are using cascading on the mobile app to delete records. |
Beta Was this translation helpful? Give feedback.
-
On every synchronisation, it is deleting and then re-downloading all the data in all tables. I have confirmed this by giving a wrong 'PROJ_ID' parameter, which removed existing rows from 'PROJECT' table and '_desx' Table, but there was data in the _clnt table (_clnt table(parent) is without filters, and don't have PROJ_ID). deleting the rows in _clnt table will definitely remove data from other tables as there is cascades on all there tables and thus we dont see any data after applying new filter for the sync. |
Beta Was this translation helpful? Give feedback.
-
The issue i have mentioned above is demonstrated on the the video link added. Issue exists from DMS 0.9.8 onwards. We intend to provision the server and client databases to synchronise data for specific projects only. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@Mimetis while looking through the code i found this link #453 (comment) Was the DisableConstraintsOnApplyChanges -> 'true' by default in 0.9.7 version? it still function in the same manner ? or @gentledepp 's suggession have already applied? thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @Mimetis Have you had a chance to look at the sample application made on Adventureworks db script in the above post. |
Beta Was this translation helpful? Give feedback.
-
Hi @Mimetis, We really appreciate your time in investigating this and we are really glad that you were able to replicate the same behaviour we see. Our question is, why does this behaviour differ from 0.9.7 with the CASCADE on the database relationship still enabled? 0.9.7 does not mark records for deletion and does not subsequently delete records from the server. PS: In the future we will use your existing database and samples to avoid confusion, and will do our best with formatting. Thanks |
Beta Was this translation helpful? Give feedback.
-
if there is a delete cascade applied on a field, DMS is deleting the previous record synced with filter from the parent table.
eg: in the example below, it is deleting from the 'project' table, when there is new sync with new filter.
https://github.com/sojan1/SyncInstaller
first sync
var parameters2 = new SyncParameters
{
{ "CLNT_ID","D1" },
{ "PROJ_ID","MASTER" }
};
second sync
var parameters2 = new SyncParameters
{
{ "CLNT_ID","D1" },
{ "PROJ_ID","Demo 2a" }
};
and the record gets removed from the hub, if synced 'MASTER' again.
Beta Was this translation helpful? Give feedback.
All reactions