Dictionaries and STON

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dictionaries and STON

CyrilFerlicot
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


signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dictionaries and STON

Sven Van Caekenberghe-2
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. <[hidden email]> 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
>
> http://www.synectique.eu
>
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>


Reply | Threaded
Open this post in threaded view
|

Re: Dictionaries and STON

CyrilFerlicot
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. <[hidden email]> 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
>>
>> http://www.synectique.eu
>>
>> 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


signature.asc (817 bytes) Download Attachment