Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riak store change type in maps #199

Closed
Euen opened this issue Sep 17, 2015 · 2 comments
Closed

Riak store change type in maps #199

Euen opened this issue Sep 17, 2015 · 2 comments
Labels

Comments

@Euen
Copy link
Member

Euen commented Sep 17, 2015

Riak store changes map's keys to atoms in sumo:find_all(module).

R1 = module:create(<<"id">>, <<"label">>, #{<<"Key1">> => <<"val1">>,<<"Key2">> => <<"val2">>}),
% Fail because sumo:find_all/1 returns 
% <<"id">>, <<"label">>, #{'Key1' => <<"val1">>, 'Key2' => <<"val2">>}
  [R1] = sumo:find_all(module), % Fail
@Euen Euen added the bug label Sep 17, 2015
@cabol
Copy link
Contributor

cabol commented Feb 26, 2016

I'm not sure if this might be considered as an issue, since sumo hasn't notion about what a map is, this type not even exist. Currently, Riak's store is assuming nested entities as sumo models, that's the reason why those fields are being transformed to atoms (following the sumo API). Otherwise, how can we know when a nested entity has to be treated as a map and when as a sumo entity? We would need, for instance, create another data type in sumo, e.g.: map. There is an issue related with "custom" types (#186), probably this is the way, once this issue is done, we can do something here.

@cabol
Copy link
Contributor

cabol commented Sep 7, 2016

It was moved to inaka/sumo_db_riak#4

@cabol cabol closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants