{"action":"created","issue":{"url":"https://api.github.com/repos/ptaoussanis/faraday/issues/63","labels_url":"https://api.github.com/repos/ptaoussanis/faraday/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/ptaoussanis/faraday/issues/63/comments","events_url":"https://api.github.com/repos/ptaoussanis/faraday/issues/63/events","html_url":"https://github.com/ptaoussanis/faraday/issues/63","id":89563091,"number":63,"title":" batch-write-item product behaviour causing problems inserting items with lists","user":{"login":"danstone","id":4095999,"avatar_url":"https://avatars.githubusercontent.com/u/4095999?v=3","gravatar_id":"","url":"https://api.github.com/users/danstone","html_url":"https://github.com/danstone","followers_url":"https://api.github.com/users/danstone/followers","following_url":"https://api.github.com/users/danstone/following{/other_user}","gists_url":"https://api.github.com/users/danstone/gists{/gist_id}","starred_url":"https://api.github.com/users/danstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danstone/subscriptions","organizations_url":"https://api.github.com/users/danstone/orgs","repos_url":"https://api.github.com/users/danstone/repos","events_url":"https://api.github.com/users/danstone/events{/privacy}","received_events_url":"https://api.github.com/users/danstone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ptaoussanis/faraday/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/ptaoussanis/faraday/labels/ideas%20welcome","name":"ideas welcome","color":"fbca04"},{"url":"https://api.github.com/repos/ptaoussanis/faraday/labels/pull-requests%20welcome","name":"pull-requests welcome","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-19T13:18:43Z","updated_at":"2015-06-24T10:23:34Z","closed_at":null,"body":"If we have top level lists in our items to insert e.g\r\n ```clojure \r\n{:put [{:id 0 :foo [1 2]}, {:id 1}]}\r\n``` \r\nit seems the request for item with :id 0 will be duplicated as\r\n\r\n```clojure \r\n[{:id 0, :foo [1]}, {:id 0, :foo [2]}, ...] \r\n```\r\nI believe you take a product when list values are involved to support deletes as documented in the doc string for `batch-write-item`: \r\n\r\n```clojure\r\n{:users {:put    [{:user-id 1 :username \\\"sally\\\"}\r\n                        {:user-id 2 :username \\\"jane\\\"}]\r\n             :delete [{:user-id [3 4 5]}]}})\r\n```\r\n\r\nObviously this causes problems when the intention is to put a list into dynamo.\r\n\r\nHopefully that is clear, comment if it isn't!\r\n\r\nRegards\r\n\r\nDan"},"comment":{"url":"https://api.github.com/repos/ptaoussanis/faraday/issues/comments/114816441","html_url":"https://github.com/ptaoussanis/faraday/issues/63#issuecomment-114816441","issue_url":"https://api.github.com/repos/ptaoussanis/faraday/issues/63","id":114816441,"user":{"login":"ptaoussanis","id":160011,"avatar_url":"https://avatars.githubusercontent.com/u/160011?v=3","gravatar_id":"","url":"https://api.github.com/users/ptaoussanis","html_url":"https://github.com/ptaoussanis","followers_url":"https://api.github.com/users/ptaoussanis/followers","following_url":"https://api.github.com/users/ptaoussanis/following{/other_user}","gists_url":"https://api.github.com/users/ptaoussanis/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaoussanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaoussanis/subscriptions","organizations_url":"https://api.github.com/users/ptaoussanis/orgs","repos_url":"https://api.github.com/users/ptaoussanis/repos","events_url":"https://api.github.com/users/ptaoussanis/events{/privacy}","received_events_url":"https://api.github.com/users/ptaoussanis/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T10:23:34Z","updated_at":"2015-06-24T10:23:34Z","body":"Okay, on track to remove this in a future breaking v2 release.\r\n\r\nHave introduced a non-breaking opt-out flag in the meantime (untested):\r\nhttps://github.com/ptaoussanis/faraday/commit/d2daff3b742faf5bc4884e79390fb5c1c01f07ec - just supply `{attr-multi-vs? false}` to `batch-write-item` or `batch-get-item`."}}