{"action":"created","comment":{"url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/comments/45871912","id":45871912,"diff_hunk":"@@ -375,12 +375,15 @@ export default class {\n       helpers.checkCreateTable(this, paramVersion).then(() => {\n         const version = (paramVersion === false) ? this.defaultVersion : paramVersion;\n         const table = this.schemas[version].tableName;\n-        const key = Object.keys(obj)[0];\n+        const keys = Object.keys(obj);\n         let params = {\n           TableName: table,\n           Key: {}\n         };\n-        params.Key[key] = obj[key];\n+        // Allows for HASH and possible RANGE key\n+        _.each(keys, (key) => {","path":"src/index.js","position":12,"original_position":12,"commit_id":"7930695d0d3c975b53cc5fdb4efed9171ecf64e8","original_commit_id":"7930695d0d3c975b53cc5fdb4efed9171ecf64e8","user":{"login":"TomFrost","id":233541,"avatar_url":"https://avatars.githubusercontent.com/u/233541?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFrost","html_url":"https://github.com/TomFrost","followers_url":"https://api.github.com/users/TomFrost/followers","following_url":"https://api.github.com/users/TomFrost/following{/other_user}","gists_url":"https://api.github.com/users/TomFrost/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFrost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFrost/subscriptions","organizations_url":"https://api.github.com/users/TomFrost/orgs","repos_url":"https://api.github.com/users/TomFrost/repos","events_url":"https://api.github.com/users/TomFrost/events{/privacy}","received_events_url":"https://api.github.com/users/TomFrost/received_events","type":"User","site_admin":false},"body":"As long as `keys` is guaranteed to be an array (in this case, it is), it's cleaner to use the native JS implementation: `keys.forEach((key) => { ... })`","created_at":"2015-11-25T14:27:52Z","updated_at":"2015-11-25T14:27:52Z","html_url":"https://github.com/node-modli/modli-dynamodb/pull/23#discussion_r45871912","pull_request_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/comments/45871912"},"html":{"href":"https://github.com/node-modli/modli-dynamodb/pull/23#discussion_r45871912"},"pull_request":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23","id":51758025,"html_url":"https://github.com/node-modli/modli-dynamodb/pull/23","diff_url":"https://github.com/node-modli/modli-dynamodb/pull/23.diff","patch_url":"https://github.com/node-modli/modli-dynamodb/pull/23.patch","issue_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/23","number":23,"state":"open","locked":false,"title":"Release 1.0.11","user":{"login":"stephen-ta","id":5216337,"avatar_url":"https://avatars.githubusercontent.com/u/5216337?v=3","gravatar_id":"","url":"https://api.github.com/users/stephen-ta","html_url":"https://github.com/stephen-ta","followers_url":"https://api.github.com/users/stephen-ta/followers","following_url":"https://api.github.com/users/stephen-ta/following{/other_user}","gists_url":"https://api.github.com/users/stephen-ta/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-ta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-ta/subscriptions","organizations_url":"https://api.github.com/users/stephen-ta/orgs","repos_url":"https://api.github.com/users/stephen-ta/repos","events_url":"https://api.github.com/users/stephen-ta/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-ta/received_events","type":"User","site_admin":false},"body":"Added functionality for RANGE key","created_at":"2015-11-25T06:45:21Z","updated_at":"2015-11-25T14:27:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06748398380aec377dc509032d945e64e2040723","assignee":{"login":"stephen-ta","id":5216337,"avatar_url":"https://avatars.githubusercontent.com/u/5216337?v=3","gravatar_id":"","url":"https://api.github.com/users/stephen-ta","html_url":"https://github.com/stephen-ta","followers_url":"https://api.github.com/users/stephen-ta/followers","following_url":"https://api.github.com/users/stephen-ta/following{/other_user}","gists_url":"https://api.github.com/users/stephen-ta/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-ta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-ta/subscriptions","organizations_url":"https://api.github.com/users/stephen-ta/orgs","repos_url":"https://api.github.com/users/stephen-ta/repos","events_url":"https://api.github.com/users/stephen-ta/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-ta/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23/commits","review_comments_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23/comments","review_comment_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/23/comments","statuses_url":"https://api.github.com/repos/node-modli/modli-dynamodb/statuses/7930695d0d3c975b53cc5fdb4efed9171ecf64e8","head":{"label":"node-modli:staging","ref":"staging","sha":"7930695d0d3c975b53cc5fdb4efed9171ecf64e8","user":{"login":"node-modli","id":14059652,"avatar_url":"https://avatars.githubusercontent.com/u/14059652?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modli","html_url":"https://github.com/node-modli","followers_url":"https://api.github.com/users/node-modli/followers","following_url":"https://api.github.com/users/node-modli/following{/other_user}","gists_url":"https://api.github.com/users/node-modli/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modli/subscriptions","organizations_url":"https://api.github.com/users/node-modli/orgs","repos_url":"https://api.github.com/users/node-modli/repos","events_url":"https://api.github.com/users/node-modli/events{/privacy}","received_events_url":"https://api.github.com/users/node-modli/received_events","type":"Organization","site_admin":false},"repo":{"id":41697506,"name":"modli-dynamodb","full_name":"node-modli/modli-dynamodb","owner":{"login":"node-modli","id":14059652,"avatar_url":"https://avatars.githubusercontent.com/u/14059652?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modli","html_url":"https://github.com/node-modli","followers_url":"https://api.github.com/users/node-modli/followers","following_url":"https://api.github.com/users/node-modli/following{/other_user}","gists_url":"https://api.github.com/users/node-modli/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modli/subscriptions","organizations_url":"https://api.github.com/users/node-modli/orgs","repos_url":"https://api.github.com/users/node-modli/repos","events_url":"https://api.github.com/users/node-modli/events{/privacy}","received_events_url":"https://api.github.com/users/node-modli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-modli/modli-dynamodb","description":"DynamoDB Adapter for Modli","fork":false,"url":"https://api.github.com/repos/node-modli/modli-dynamodb","forks_url":"https://api.github.com/repos/node-modli/modli-dynamodb/forks","keys_url":"https://api.github.com/repos/node-modli/modli-dynamodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-modli/modli-dynamodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-modli/modli-dynamodb/teams","hooks_url":"https://api.github.com/repos/node-modli/modli-dynamodb/hooks","issue_events_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/events{/number}","events_url":"https://api.github.com/repos/node-modli/modli-dynamodb/events","assignees_url":"https://api.github.com/repos/node-modli/modli-dynamodb/assignees{/user}","branches_url":"https://api.github.com/repos/node-modli/modli-dynamodb/branches{/branch}","tags_url":"https://api.github.com/repos/node-modli/modli-dynamodb/tags","blobs_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-modli/modli-dynamodb/statuses/{sha}","languages_url":"https://api.github.com/repos/node-modli/modli-dynamodb/languages","stargazers_url":"https://api.github.com/repos/node-modli/modli-dynamodb/stargazers","contributors_url":"https://api.github.com/repos/node-modli/modli-dynamodb/contributors","subscribers_url":"https://api.github.com/repos/node-modli/modli-dynamodb/subscribers","subscription_url":"https://api.github.com/repos/node-modli/modli-dynamodb/subscription","commits_url":"https://api.github.com/repos/node-modli/modli-dynamodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-modli/modli-dynamodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-modli/modli-dynamodb/contents/{+path}","compare_url":"https://api.github.com/repos/node-modli/modli-dynamodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-modli/modli-dynamodb/merges","archive_url":"https://api.github.com/repos/node-modli/modli-dynamodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-modli/modli-dynamodb/downloads","issues_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues{/number}","pulls_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls{/number}","milestones_url":"https://api.github.com/repos/node-modli/modli-dynamodb/milestones{/number}","notifications_url":"https://api.github.com/repos/node-modli/modli-dynamodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-modli/modli-dynamodb/labels{/name}","releases_url":"https://api.github.com/repos/node-modli/modli-dynamodb/releases{/id}","created_at":"2015-08-31T20:00:16Z","updated_at":"2015-11-13T18:19:00Z","pushed_at":"2015-11-25T06:54:31Z","git_url":"git://github.com/node-modli/modli-dynamodb.git","ssh_url":"git@github.com:node-modli/modli-dynamodb.git","clone_url":"https://github.com/node-modli/modli-dynamodb.git","svn_url":"https://github.com/node-modli/modli-dynamodb","homepage":"http://node-modli.github.io/modli/","size":101,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"node-modli:master","ref":"master","sha":"a968493e9a8b27428068b2ae7f37da0e0f029fef","user":{"login":"node-modli","id":14059652,"avatar_url":"https://avatars.githubusercontent.com/u/14059652?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modli","html_url":"https://github.com/node-modli","followers_url":"https://api.github.com/users/node-modli/followers","following_url":"https://api.github.com/users/node-modli/following{/other_user}","gists_url":"https://api.github.com/users/node-modli/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modli/subscriptions","organizations_url":"https://api.github.com/users/node-modli/orgs","repos_url":"https://api.github.com/users/node-modli/repos","events_url":"https://api.github.com/users/node-modli/events{/privacy}","received_events_url":"https://api.github.com/users/node-modli/received_events","type":"Organization","site_admin":false},"repo":{"id":41697506,"name":"modli-dynamodb","full_name":"node-modli/modli-dynamodb","owner":{"login":"node-modli","id":14059652,"avatar_url":"https://avatars.githubusercontent.com/u/14059652?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modli","html_url":"https://github.com/node-modli","followers_url":"https://api.github.com/users/node-modli/followers","following_url":"https://api.github.com/users/node-modli/following{/other_user}","gists_url":"https://api.github.com/users/node-modli/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modli/subscriptions","organizations_url":"https://api.github.com/users/node-modli/orgs","repos_url":"https://api.github.com/users/node-modli/repos","events_url":"https://api.github.com/users/node-modli/events{/privacy}","received_events_url":"https://api.github.com/users/node-modli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-modli/modli-dynamodb","description":"DynamoDB Adapter for Modli","fork":false,"url":"https://api.github.com/repos/node-modli/modli-dynamodb","forks_url":"https://api.github.com/repos/node-modli/modli-dynamodb/forks","keys_url":"https://api.github.com/repos/node-modli/modli-dynamodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-modli/modli-dynamodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-modli/modli-dynamodb/teams","hooks_url":"https://api.github.com/repos/node-modli/modli-dynamodb/hooks","issue_events_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/events{/number}","events_url":"https://api.github.com/repos/node-modli/modli-dynamodb/events","assignees_url":"https://api.github.com/repos/node-modli/modli-dynamodb/assignees{/user}","branches_url":"https://api.github.com/repos/node-modli/modli-dynamodb/branches{/branch}","tags_url":"https://api.github.com/repos/node-modli/modli-dynamodb/tags","blobs_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-modli/modli-dynamodb/statuses/{sha}","languages_url":"https://api.github.com/repos/node-modli/modli-dynamodb/languages","stargazers_url":"https://api.github.com/repos/node-modli/modli-dynamodb/stargazers","contributors_url":"https://api.github.com/repos/node-modli/modli-dynamodb/contributors","subscribers_url":"https://api.github.com/repos/node-modli/modli-dynamodb/subscribers","subscription_url":"https://api.github.com/repos/node-modli/modli-dynamodb/subscription","commits_url":"https://api.github.com/repos/node-modli/modli-dynamodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-modli/modli-dynamodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-modli/modli-dynamodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-modli/modli-dynamodb/contents/{+path}","compare_url":"https://api.github.com/repos/node-modli/modli-dynamodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-modli/modli-dynamodb/merges","archive_url":"https://api.github.com/repos/node-modli/modli-dynamodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-modli/modli-dynamodb/downloads","issues_url":"https://api.github.com/repos/node-modli/modli-dynamodb/issues{/number}","pulls_url":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls{/number}","milestones_url":"https://api.github.com/repos/node-modli/modli-dynamodb/milestones{/number}","notifications_url":"https://api.github.com/repos/node-modli/modli-dynamodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-modli/modli-dynamodb/labels{/name}","releases_url":"https://api.github.com/repos/node-modli/modli-dynamodb/releases{/id}","created_at":"2015-08-31T20:00:16Z","updated_at":"2015-11-13T18:19:00Z","pushed_at":"2015-11-25T06:54:31Z","git_url":"git://github.com/node-modli/modli-dynamodb.git","ssh_url":"git@github.com:node-modli/modli-dynamodb.git","clone_url":"https://github.com/node-modli/modli-dynamodb.git","svn_url":"https://github.com/node-modli/modli-dynamodb","homepage":"http://node-modli.github.io/modli/","size":101,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23"},"html":{"href":"https://github.com/node-modli/modli-dynamodb/pull/23"},"issue":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/23"},"comments":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/node-modli/modli-dynamodb/statuses/7930695d0d3c975b53cc5fdb4efed9171ecf64e8"}}}}