Closed sagar-sable closed 1 year ago
Hi @sagar14791 thanks for asking! Currently there is no way to configure a specific model to be excluded from the sync engine programmatically.
Is SALES_LIST
a model? Or a filed of a model?
SALES_LIST
it is a field of type list in the "AllRetailerList" model
Hi @sagar14791 thanks for asking! Currently there is no way to configure a specific model to be excluded from the sync engine programmatically.
Is
SALES_LIST
a model? Or a filed of a model?
my requirement is that I have 5 models which I want to sync when the application starts for the first time on a particular date it will sync all data from the server after that I have the condition, that if the date is the same it will not sync for that day again. after that, I add data in the new 6th model which I use to add data in offline mode, once all is done user can click on the button to sync data from the 6th model to the server without disturbing other models.
Hey @sagar14791 sorry for the super delayed response, I completely lost track of this issue...
that if the date is the same it will not sync for that day again.
Have you tried to specify syncInterval
when initiating DataStore? It should be to achieve what you are looking for.
after that, I add data in the new 6th model which I use to add data in offline mode, once all is done user can click on the button to sync data from the 6th model to the server without disturbing other models.
I need a bit clarification on this:
Hi @HuiSF everything is model class not records in model 5/6 models means 5 models will get data from Amplify database once i start application and in 6th model i will be saving data locally using datastore query eg. await Amplify.Datastore.save(data); what i want to achieve is if 5 models are already synced then i don't want to sync data inside them again but my 6th model has some data locally which i want to send to server then server will update few fields in amplify and then i want updated data again for 6th model only not for other model
@HuiSF also will there be any feature coming soon for Amplify Re-Configuration?
Hi @HuiSF everything is model class not records in model 5/6 models means 5 models will get data from Amplify database once i start application and in 6th model i will be saving data locally using datastore query eg. await Amplify.Datastore.save(data); what i want to achieve is if 5 models are already synced then i don't want to sync data inside them again but my 6th model has some data locally which i want to send to server then server will update few fields in amplify and then i want updated data again for 6th model only not for other model
Sorry for the delayed response @sagar14791 I think what you are asking has already been supported today in DataStore.
syncInterval
, if you don't want frequent full sync, you can set a relatively larger syncInterval
according to your use case.@HuiSF also will there be any feature coming soon for Amplify Re-Configuration?
I don't have a timeline for this at this moment. Sorry.
Closing this issue per above comment.
Amplify re-configuration feature request is tracked here: https://github.com/aws-amplify/amplify-flutter/issues/1208
Please feel free to reopen if any follow ups are needed.
I am using 2 Configurations for amplify
i want to sync data from ProductData only and not to from SALES_LIST but configureAmplifyOnline() sync all data how to stop auto sync for specific MODELS?