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

Add :map field type #354

Merged
merged 4 commits into from
May 12, 2019
Merged

Conversation

andrykonchin
Copy link
Member

Changed:

  • Added map type

There are already in use array type, that matches the List DynamoDB type, and raw type, that matches automatically any supported DynamoDB type (including List and Map). But there is no dedicated type for Map which forces using raw type in order to store Hash/JSON-like data. It may confuse users (and actually there was created issue with such request).

Example:

class User
  include Dynamoid::Document
  field :settings, :map
end

User.create(settings: {foo: {bar: ['baz]'}})

@andrykonchin andrykonchin force-pushed the add-warning-about-skipped-conditions branch from 6ee41be to d42db89 Compare May 12, 2019 17:19
@andrykonchin andrykonchin merged commit f51d189 into master May 12, 2019
@andrykonchin andrykonchin deleted the add-warning-about-skipped-conditions branch May 12, 2019 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant