{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4131","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4131/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4131/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4131/events","html_url":"https://github.com/sequelize/sequelize/issues/4131","id":95438016,"number":4131,"title":"Setting null value when omitnull is true","user":{"login":"radoslavpetranov","id":2715732,"avatar_url":"https://avatars.githubusercontent.com/u/2715732?v=3","gravatar_id":"","url":"https://api.github.com/users/radoslavpetranov","html_url":"https://github.com/radoslavpetranov","followers_url":"https://api.github.com/users/radoslavpetranov/followers","following_url":"https://api.github.com/users/radoslavpetranov/following{/other_user}","gists_url":"https://api.github.com/users/radoslavpetranov/gists{/gist_id}","starred_url":"https://api.github.com/users/radoslavpetranov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radoslavpetranov/subscriptions","organizations_url":"https://api.github.com/users/radoslavpetranov/orgs","repos_url":"https://api.github.com/users/radoslavpetranov/repos","events_url":"https://api.github.com/users/radoslavpetranov/events{/privacy}","received_events_url":"https://api.github.com/users/radoslavpetranov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-16T13:52:00Z","updated_at":"2015-07-20T07:20:52Z","closed_at":null,"body":"Hi there,\r\n\r\nI've been trying to figure out if there's a more gracious way to handle the following scenario:\r\n\r\n- Sequelize is initialized with omitnull = true\r\n- it works great in 95% of the cases\r\n- every now and then I need to explicitly set a value back to null and I can't do that no matter what I try. If that's the only change I'm doing I'll also end up with this (which is normal)\r\n\r\nSequelizeDatabaseError: ER_EMPTY_QUERY: Query was empty\r\n\r\nRight now the only workaround I've been able to do is to use sequelize with a pure SQL UPDATE query to update the entries I need. My problem is that this approach is super ugly and I was wondering if there's more gracious way to handle these scenarios. Something like being able to pass { omitNull : true } with the options of instance.save() or instance.set() would be awesome but I don't think that's supported right now. Are there any more sequelize-friendly ways to set a null value?\r\n\r\nCheers and thanks!"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/122784632","html_url":"https://github.com/sequelize/sequelize/issues/4131#issuecomment-122784632","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/4131","id":122784632,"user":{"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},"created_at":"2015-07-20T07:20:52Z","updated_at":"2015-07-20T07:20:52Z","body":"Hmm, yeah I made a guess that you weren't using sync, but generating your tables manually when you said that the UUID was generated by the DB. \r\n\r\nI don't think there is any good way to fix this now then - we'd need to add a new option `autoGenerated` or similar, to tell sequelize that this is the column that is generated by the db."}}