{"action":"closed","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/10358","repository_url":"https://api.github.com/repos/gitlabhq/gitlabhq","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/10358/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/10358/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/10358/events","html_url":"https://github.com/gitlabhq/gitlabhq/issues/10358","id":158348316,"number":10358,"title":"validate schema after calling `beforeCreate` ","user":{"login":"jurajsimbs","id":18613927,"avatar_url":"https://avatars.githubusercontent.com/u/18613927?v=3","gravatar_id":"","url":"https://api.github.com/users/jurajsimbs","html_url":"https://github.com/jurajsimbs","followers_url":"https://api.github.com/users/jurajsimbs/followers","following_url":"https://api.github.com/users/jurajsimbs/following{/other_user}","gists_url":"https://api.github.com/users/jurajsimbs/gists{/gist_id}","starred_url":"https://api.github.com/users/jurajsimbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurajsimbs/subscriptions","organizations_url":"https://api.github.com/users/jurajsimbs/orgs","repos_url":"https://api.github.com/users/jurajsimbs/repos","events_url":"https://api.github.com/users/jurajsimbs/events{/privacy}","received_events_url":"https://api.github.com/users/jurajsimbs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T11:37:34Z","updated_at":"2016-06-03T12:50:28Z","closed_at":"2016-06-03T12:50:28Z","body":"model schema needs to be validated after `beforeCreate` hook, not before it.\r\nWe might have some mandatory fields like this:\r\n```\r\nschema: {\r\n                //..............\r\n                unique_identifier: {\r\n                    type: DataTypes.STRING,\r\n                    allowEmptyValue: false,\r\n                },\r\n                //..............\r\n}\r\n```\r\nbut don't want to insert them via `.create` method - but compute them in `beforeCreate` hook"}}
{"actor":{"display_login":"jvanbaarsen"}}