Question on isSynced($currentObject)

0
Can anyone tell me if the isSynced function checks to see if ANY row of an object type is out of sync, or if this just checks a single row or one instance of an object type? I’m working with an offline native app that needs to synchronize new rows to the cloud  and need to check if the user added any rows while they were offline that haven’t been sync’d yet. Thanks for any help
asked
4 answers
0

This checks for the given object offline changes are synced with the runtime database, yes (true) or no (false). So it's an object comparison. So I suppose each row is at least one object.

Please make sure you commit your changed/added rows (objects) before trigger the sync process. 

 

answered
0

That was my question – do I need to check IsSynced for each row individually ? or do I reference the object type (all rows)

answered
0

Thanks for your help

answered
0

You pass an object (in your case a row) to the isSynced to check if the passed object is in sync.

What do you mean with “reference type”? Imagine you have an entity “Car” with some attributes, then “Car” says you about the structure. You cannot use “Car” to get all the car objects. In that case you need a list of car's, but you cannot pass a list to isSynced.

answered