-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
key:
with number type -> type mismatch
#596
Comments
Hi. First of all - integer/numeric partition keys are supported. Next. Integer field should be declared with field :my_field, :integer DynamoDB supports boolean type natively and AFAIK it isn't related or converted implicitly to integer. Dynamoid supports also storing boolean values (boolean Ruby values - TrueClass/FalseClass) as a DynamoDB string attribute ( |
Thanks for the reply. i've used this field as an example, its not the actual field - i edited it. |
Could you plz provide a minimal example to reproduce the issue? In the edited code snippet above I noticed that attribute names (used in Answering your question about declaration of the integer partition key. It should be declared as a field of |
Hey! When i define |
Yes, to have a non-String partition key a new field (for this attribute) should be declared explicitly with a needed type. Example: class User
include Dynamoid::Document
table key: :numeric_key
field :numeric_key, :integer
end |
Thanks ! |
Specifying a hash key type in the table definition is in my TODO list, heh. But it's definitely makes sense to add an example in Readme. |
Hi!
I am trying to define a table with an integer as the key.
In my schema i define
my_key
to be the partition key. whenmy_key
is a string everything work's great, but when i change the schema to :I am getting :
I couldn't find any example with a number type key. is this supported?
Thanks
The text was updated successfully, but these errors were encountered: