Dictionaries and STON
Hi! I need to store some datas and in my model I have a dictionary with objects as keys. When I try to serialize and materialize it with STON I get an error. Apparently STON manage dictionaries with literals as key only. Is there a workaround to this? -- Cyril Ferlicot http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France
Hi Cyril, See this commit: === Name: STON-Core-SvenVanCaekenberghe.77 Author: SvenVanCaekenberghe Time: 24 October 2016, 10:36:19.993021 am UUID: cb69cdaa-0065-4014-afa7-67a2a7e445db Ancestors: STON-Core-SvenVanCaekenberghe.76 Remove the option #allowComplexMapKeys from STONReader (to functionally always allow it; leave the accessor #allowComplexMapsKeys: as a no-op for backwards compatibility) - remove all usage, simplify implementation. === So, either use a later version or tell your reader to allowComplexMapsKeys: true. Sven
On 28 Nov 2016, at 13:53, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Hi!
I need to store some datas and in my model I have a dictionary with objects as keys. When I try to serialize and materialize it with STON I get an error. Apparently STON manage dictionaries with literals as key only.
Is there a workaround to this?
-- Cyril Ferlicot
2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France
On 28/11/2016 14:20, Sven Van Caekenberghe wrote:
Hi Cyril,
See this commit:
=== Name: STON-Core-SvenVanCaekenberghe.77 Author: SvenVanCaekenberghe Time: 24 October 2016, 10:36:19.993021 am UUID: cb69cdaa-0065-4014-afa7-67a2a7e445db Ancestors: STON-Core-SvenVanCaekenberghe.76
Remove the option #allowComplexMapKeys from STONReader (to functionally always allow it; leave the accessor #allowComplexMapsKeys: as a no-op for backwards compatibility) - remove all usage, simplify implementation. ===
So, either use a later version or tell your reader to allowComplexMapsKeys: true.
Sven
On 28 Nov 2016, at 13:53, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Hi!
I need to store some datas and in my model I have a dictionary with objects as keys. When I try to serialize and materialize it with STON I get an error. Apparently STON manage dictionaries with literals as key only.
Is there a workaround to this?
-- Cyril Ferlicot
2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France
I had not the latest version on my image. Perfect! Thank you :) -- Cyril Ferlicot http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France
participants (2)
-
Cyril Ferlicot D. -
Sven Van Caekenberghe