{"action":"created","issue":{"url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/135","repository_url":"https://api.github.com/repos/vladmihalcea/hibernate-types","labels_url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/135/comments","events_url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/135/events","html_url":"https://github.com/vladmihalcea/hibernate-types/issues/135","id":498810770,"node_id":"MDU6SXNzdWU0OTg4MTA3NzA=","number":135,"title":"Mappin enum to String column uses toString() instead of name()","user":{"login":"SayakMukhopadhyay","id":13748882,"node_id":"MDQ6VXNlcjEzNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/13748882?v=4","gravatar_id":"","url":"https://api.github.com/users/SayakMukhopadhyay","html_url":"https://github.com/SayakMukhopadhyay","followers_url":"https://api.github.com/users/SayakMukhopadhyay/followers","following_url":"https://api.github.com/users/SayakMukhopadhyay/following{/other_user}","gists_url":"https://api.github.com/users/SayakMukhopadhyay/gists{/gist_id}","starred_url":"https://api.github.com/users/SayakMukhopadhyay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SayakMukhopadhyay/subscriptions","organizations_url":"https://api.github.com/users/SayakMukhopadhyay/orgs","repos_url":"https://api.github.com/users/SayakMukhopadhyay/repos","events_url":"https://api.github.com/users/SayakMukhopadhyay/events{/privacy}","received_events_url":"https://api.github.com/users/SayakMukhopadhyay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-09-26T10:51:58Z","updated_at":"2019-09-26T14:51:19Z","closed_at":null,"author_association":"NONE","body":"I have a field in an entity like\r\n```\r\n...\r\n@Type( type = \"pgsql_enum\" )\r\n@Enumerated(EnumType.STRING)\r\nprivate MyEnum myEnum;\r\n...\r\n```\r\nwhere `MyEnum` is defined as \r\n```\r\npublic enum MyEnum{\r\n    PROP_A {\r\n        @Override\r\n        public String toString() {\r\n            return \"Prop A\";\r\n        }\r\n    }\r\n}\r\n```\r\nI expected that in my db the field would be `PROP_A` but I find that it is `Prop A` which indicates that the conversion is using the `toString()` representation of enum whereas I believe `name()` would be more appropriate since `toString()` is overridable and `name()` is not.\r\nIs there a workaround or a configuration property I have overlooked?"},"comment":{"url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/comments/535540853","html_url":"https://github.com/vladmihalcea/hibernate-types/issues/135#issuecomment-535540853","issue_url":"https://api.github.com/repos/vladmihalcea/hibernate-types/issues/135","id":535540853,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTU0MDg1Mw==","user":{"login":"vladmihalcea","id":5571399,"node_id":"MDQ6VXNlcjU1NzEzOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/5571399?v=4","gravatar_id":"","url":"https://api.github.com/users/vladmihalcea","html_url":"https://github.com/vladmihalcea","followers_url":"https://api.github.com/users/vladmihalcea/followers","following_url":"https://api.github.com/users/vladmihalcea/following{/other_user}","gists_url":"https://api.github.com/users/vladmihalcea/gists{/gist_id}","starred_url":"https://api.github.com/users/vladmihalcea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladmihalcea/subscriptions","organizations_url":"https://api.github.com/users/vladmihalcea/orgs","repos_url":"https://api.github.com/users/vladmihalcea/repos","events_url":"https://api.github.com/users/vladmihalcea/events{/privacy}","received_events_url":"https://api.github.com/users/vladmihalcea/received_events","type":"User","site_admin":false},"created_at":"2019-09-26T14:51:19Z","updated_at":"2019-09-26T14:51:19Z","author_association":"OWNER","body":"Send me a Pull Request with a replicating test case and a fix as well. I'll review it when it's ready."}}
{"actor":{"display_login":"vladmihalcea"}}