{"action":"opened","issue":{"url":"https://api.github.com/repos/automategreen/dynamoose/issues/57","repository_url":"https://api.github.com/repos/automategreen/dynamoose","labels_url":"https://api.github.com/repos/automategreen/dynamoose/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/automategreen/dynamoose/issues/57/comments","events_url":"https://api.github.com/repos/automategreen/dynamoose/issues/57/events","html_url":"https://github.com/automategreen/dynamoose/issues/57","id":172350965,"number":57,"title":"Model Unique","user":{"login":"fishcharlie","id":860375,"avatar_url":"https://avatars.githubusercontent.com/u/860375?v=3","gravatar_id":"","url":"https://api.github.com/users/fishcharlie","html_url":"https://github.com/fishcharlie","followers_url":"https://api.github.com/users/fishcharlie/followers","following_url":"https://api.github.com/users/fishcharlie/following{/other_user}","gists_url":"https://api.github.com/users/fishcharlie/gists{/gist_id}","starred_url":"https://api.github.com/users/fishcharlie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fishcharlie/subscriptions","organizations_url":"https://api.github.com/users/fishcharlie/orgs","repos_url":"https://api.github.com/users/fishcharlie/repos","events_url":"https://api.github.com/users/fishcharlie/events{/privacy}","received_events_url":"https://api.github.com/users/fishcharlie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-22T00:33:12Z","updated_at":"2016-08-22T00:33:12Z","closed_at":null,"body":"So in MongoDB and Mongoose it automatically has a section for id. Doesn't seem like Dynamoose/DynamoDB has an option for that. So far I've been creating a random string every time I save a new record that is the ID.\r\n\r\nOne of the problems with that is if the ID ever overlaps with another ID then that is a problem. Is there a way to set that to be `unique: true`? According to the documentation there is an option for required but I can't find anything about unique. I know it is an option in Mongoose tho.\r\n\r\nFinally is there a better way to handle generating a unique ID for every record? If I just set unique to true then I will have to retry that save since it will have failed which adds a layer of complexity. So is there a better way to handle this?"}}
{"actor":{"display_login":"fishcharlie"}}