We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've got some code as follows, in which DeviceToken is a Dynamoid record and phone_number is its hash_key, but it also has a range key :
DeviceToken.where(phone_number: user.phone_number).each do |device_token| device_token.destroy end
The 'where' succeeds, but the destroy fails with "a range key value is required for this table"
gems/aws-sdk-1.27.0/lib/aws/dynamo_db/item_collection.rb:244:in `at' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/adapter/aws_sdk.rb:129:in `delete_item' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/adapter.rb:146:in `block (3 levels) in <module:Adapter>' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/adapter.rb:39:in `benchmark' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/adapter.rb:146:in `block (2 levels) in <module:Adapter>' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/adapter.rb:121:in `delete' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/persistence.rb:214:in `delete' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/identity_map.rb:84:in `delete' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/persistence.rb:203:in `block in destroy' gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__1909464996163745819__destroy__callbacks' gems/ruby-1.9.3-p448/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks' gems/ruby-1.9.3-p448/gems/dynamoid-0.7.1/lib/dynamoid/persistence.rb:202:in `destroy'
Since the record has already been looked up by hash_key, destroy should just work
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've got some code as follows, in which DeviceToken is a Dynamoid record and phone_number is its hash_key, but it also has a range key :
The 'where' succeeds, but the destroy fails with "a range key value is required for this table"
Since the record has already been looked up by hash_key, destroy should just work
The text was updated successfully, but these errors were encountered: