[Glass] how to update models properly

James Foster via Glass glass at lists.gemtalksystems.com
Thu Oct 30 09:15:01 PDT 2014

> On Oct 29, 2014, at 1:33 PM, Sebastian Heidbrink via Glass <glass at lists.gemtalksystems.com> wrote:
> @James
> That sounds interesting. I never thought about that. I assume that approach is only used on non collection based attributes.

Depending on how complex you want to make the “foreign” system, you can use the same approach. In addition to giving your root object a unique ID you can give a unique ID to any other persistent objects and then add/remove them from a collection. The extreme case would be to use the OOP/OID from GemStone as the unique ID and then create message sends remotely. Your JSON could be as sophisticated/trivial as:
	“receiver”: { “id”: 123 },
	“selector”: “addAll:”,
	“arguments”: [
		{ “id”: 456 }, 
		{ “id”: 789 }

In addition to using object identifiers, you could provide string literals, numeric literals, booleans, etc.


More information about the Glass mailing list