gritzko/swarm

Does Swarm support nested objects and how ?

Opened this issue · 3 comments

I would like to know if there is some any way to support nested objects.

Well by nested objects you mean what exactly ? As far I have understood you could create the Syncable Model for example Item and which is part of the ItemList objectType for the Vector or Set ?

In the 0.3 it is possible to manually keep object ids as strings and fetch referenced objects. Also, Model may have nested JSON values, but those will not be syncables (i.e. last write wins). Another possibility is to use collections that load all of the members at once.
Of course, it is way more convenient to have syncable objects graphs that load (semi) automatically so the developer does not bother with manual fetching and stuff. That comes in 0.4 with Syncable.Ref.

JSON nested Last-Write-Wins objects is another option...