{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/2225","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/2225/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2225/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/2225/events","html_url":"https://github.com/sequelize/sequelize/issues/2225","id":41668492,"number":2225,"title":"defaultValue: Sequelize.UUIDV4 not working?","user":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelize/sequelize/labels/question","name":"question","color":"02d7e1"}],"state":"closed","locked":false,"assignee":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2014-09-02T01:16:42Z","updated_at":"2015-01-08T09:00:43Z","closed_at":"2014-09-23T08:12:03Z","body":"I'm using the following model with a sqlite3 backing:\r\n```\r\nvar models = {\r\n    Ink: sequelize.define(\"Ink\", {\r\n      id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4 },\r\n      company: Sequelize.TEXT,\r\n      inkname: Sequelize.TEXT,\r\n      profiles: Sequelize.ARRAY(Sequelize.UUID),\r\n      notes: Sequelize.ARRAY(Sequelize.UUID)\r\n    }),\r\n   ...\r\n};\r\n```\r\nbut the following code leads to a record without an autogenerated id:\r\n```\r\nvar ink = models.Ink.build({\r\n  company: \"a\",\r\n  inkname: \"b\"\r\n});\r\n\r\nink.save().complete(function() {\r\n  console.log(ink.company, ink.inkname, ink.id);\r\n});\r\n```\r\nThe console log shows `a b null` instead.\r\n\r\nIt gets even more fun when I try `id: { type: Sequelize.UUID, allowNull: false, defaultValue: Sequelize.UUIDV4 }` because it ends up `null` anyway."},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/69152332","html_url":"https://github.com/sequelize/sequelize/issues/2225#issuecomment-69152332","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2225","id":69152332,"user":{"login":"JSteunou","id":2323127,"avatar_url":"https://avatars.githubusercontent.com/u/2323127?v=3","gravatar_id":"","url":"https://api.github.com/users/JSteunou","html_url":"https://github.com/JSteunou","followers_url":"https://api.github.com/users/JSteunou/followers","following_url":"https://api.github.com/users/JSteunou/following{/other_user}","gists_url":"https://api.github.com/users/JSteunou/gists{/gist_id}","starred_url":"https://api.github.com/users/JSteunou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSteunou/subscriptions","organizations_url":"https://api.github.com/users/JSteunou/orgs","repos_url":"https://api.github.com/users/JSteunou/repos","events_url":"https://api.github.com/users/JSteunou/events{/privacy}","received_events_url":"https://api.github.com/users/JSteunou/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T09:00:43Z","updated_at":"2015-01-08T09:00:43Z","body":"Ho my... I'm so sorry, I wrote \"v4\" with a lower \"v\". That's why it does not work. Good night of sleep helped."}}