I'm trying to sync data back to ArcGIS server from my offline geodatabase and in one table new features have their foreign keys set to null during the sync.
I have an application where I have tables A, B, C, D and E. Tables D and E have geometries. There are globalid based relationships between A and B, B and C, C and D, D and E. When creating the replica, it uses layerqueries to take rows only to geodatabase table A.
The user then creates rows for tables B, C, D and E in offline mode, so all features in these tables are new.
When user has created all necessary data in offline, user tries to sync it back to the ArcGIS server. At this point, I can check the .geodatabase file and see that the data is fine and all relationships are working.
However, when the data is synced back to the ArcGIS Server, for some reason, all the foreign keys in the table D are set to null. I tested this various times and noticed that this only happens when user adds data to table E as well. If the user does not add any rows to table E, the foreign keys are saved correctly in the sync process.
In the attached screenshot, it is possible to see that the two rows are okay in the .geodatabase file but when synced and viewed from the online database, the foreign keys "MKIKUVIONTARKASTUS_GLOBALID" are set to null.
All other data in synced tables is synced correctly.
Is there any explanation that could possibly cause this? Has anyone else experienced similar problems?