{"action":"closed","issue":{"url":"https://api.github.com/repos/go-pg/pg/issues/1057","repository_url":"https://api.github.com/repos/go-pg/pg","labels_url":"https://api.github.com/repos/go-pg/pg/issues/1057/labels{/name}","comments_url":"https://api.github.com/repos/go-pg/pg/issues/1057/comments","events_url":"https://api.github.com/repos/go-pg/pg/issues/1057/events","html_url":"https://github.com/go-pg/pg/issues/1057","id":389651289,"node_id":"MDU6SXNzdWUzODk2NTEyODk=","number":1057,"title":"UpdatedAt with column","user":{"login":"lulucas","id":19854458,"node_id":"MDQ6VXNlcjE5ODU0NDU4","avatar_url":"https://avatars2.githubusercontent.com/u/19854458?v=4","gravatar_id":"","url":"https://api.github.com/users/lulucas","html_url":"https://github.com/lulucas","followers_url":"https://api.github.com/users/lulucas/followers","following_url":"https://api.github.com/users/lulucas/following{/other_user}","gists_url":"https://api.github.com/users/lulucas/gists{/gist_id}","starred_url":"https://api.github.com/users/lulucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lulucas/subscriptions","organizations_url":"https://api.github.com/users/lulucas/orgs","repos_url":"https://api.github.com/users/lulucas/repos","events_url":"https://api.github.com/users/lulucas/events{/privacy}","received_events_url":"https://api.github.com/users/lulucas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-11T08:43:24Z","updated_at":"2018-12-23T08:38:43Z","closed_at":"2018-12-23T08:38:43Z","author_association":"NONE","body":"For example, I have such model.\r\n\r\n```\r\ntype Model struct {\r\n\tId        int \r\n        Username string\r\n\tCreatedAt time.Time\r\n\tUpdatedAt time.Time\r\n}\r\n\r\nfunc (m *Model) BeforeUpdate(db orm.DB) error {\r\n\tm.UpdatedAt = time.Now()\r\n\treturn nil\r\n}\r\n\r\n```\r\nThe updated_at column will be omitted, when I use column(\"username\") to limit the column.\r\nSo I have also to add updated_at to column every time.\r\nIs there any way to do it automatically? Such as BeforeUpdateQuery hooks to add column?"}}
{"actor":{"display_login":"vmihailenco"}}