-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WriteRequestBatch example assumes that all attributes are of StringSet type #31
Comments
I'm not sure I if what you are saying is correct. Have you tested out what you are describing? |
I did test it. Every attribute had ["SS" => value], which I found weird. I traced it to the Attribute::factory call before going with a new Item(...), so I don't have more info on that. |
OK, we'll look into that too. Thanks for letting us know. |
Jeremy, it looks like I'm not able to reproduce the problem I was having. I'm terribly sorry to have wasted your time. Everything works as designed and Attribute::factory assigns types as expected. |
Hey, no worries! Thanks for looking back into it for us. 😄 |
Hey guys. The current docs branch has a great example on using WriteRequestBatch to add an item. The problem is that the method used in the example - Item's fromArray- will assume each attribute to be a StringSet. This will end you with an exception when the type of ie. your hash key is not a StringSet (which is exactly the case in your PutItem example).
You should probably include a heads-up with this specific example and mention that the constructor of Item will take attributes in the (old) array format which has type definitions.
The text was updated successfully, but these errors were encountered: