On 17/05/2017 16:02, Sven Van Caekenberghe wrote: > > OK, that is an understandable example. > > But why exactly do you want Currency to be serialised differently ? You don't > want too many instances ? You want all instances to be #== ? Is Currency too > big ? You want to allow humans to edit the STON file ? What ? Why ? > > You can easily make it Currency['Euro'] or even Currency[#Euro] like it is > already done for a number of built-in classes. > > The last example that I gave solved the 'too many instances', make them #== > issue. > > If it is size, that got covered too, but you must solve the problem of how > the receiving end will resolve the reference then. > > But since that is all no good, there must still be another requirement.
Here it is a simple example to show what I want. The real use case is that in Moose, entities are really connected to their model, and if one of our classes contains an entity it would produce a really really really big ston file since it would export millions of entities. But there is a way to retrieve an entity of this model from its moose name. Thus, I would like to export only the moose name of the entities, then get the corresponding entity from a Model the user would have load before during the ston reading. > > -- Cyril Ferlicot https://ferlicot.fr http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France
signature.asc
Description: OpenPGP digital signature