{"action":"created","issue":{"url":"https://api.github.com/repos/klen/mixer/issues/73","repository_url":"https://api.github.com/repos/klen/mixer","labels_url":"https://api.github.com/repos/klen/mixer/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/klen/mixer/issues/73/comments","events_url":"https://api.github.com/repos/klen/mixer/issues/73/events","html_url":"https://github.com/klen/mixer/issues/73","id":194652283,"number":73,"title":"Data generation and UUIDType from SQLAlchemy Utils","user":{"login":"frankrousseau","id":1336623,"avatar_url":"https://avatars3.githubusercontent.com/u/1336623?v=4","gravatar_id":"","url":"https://api.github.com/users/frankrousseau","html_url":"https://github.com/frankrousseau","followers_url":"https://api.github.com/users/frankrousseau/followers","following_url":"https://api.github.com/users/frankrousseau/following{/other_user}","gists_url":"https://api.github.com/users/frankrousseau/gists{/gist_id}","starred_url":"https://api.github.com/users/frankrousseau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankrousseau/subscriptions","organizations_url":"https://api.github.com/users/frankrousseau/orgs","repos_url":"https://api.github.com/users/frankrousseau/repos","events_url":"https://api.github.com/users/frankrousseau/events{/privacy}","received_events_url":"https://api.github.com/users/frankrousseau/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T17:28:09Z","updated_at":"2018-03-04T13:36:45Z","closed_at":"2016-12-22T09:20:16Z","author_association":"NONE","body":"Hello there,\r\n\r\nThank you for mixer, it is a very useful tool. I use it to test an API based on Flask Restful and Postgres. But I face an issue. When I want to use a UUIDType column in my database schema, it is not recognized and Mixer can't give a value to it (this type comes from [SQLAlchemy utils](http://sqlalchemy-utils.readthedocs.io/en/latest/data_types.html#module-sqlalchemy_utils.types.uuid)). \r\n\r\nI tried [this solution](http://stackoverflow.com/questions/26416307/attributeerror-for-custom-types-with-mixer):\r\n\r\n```python\r\nfrom mixer.backend.sqlalchemy import GenFactory\r\nGenFactory.generators[UUIDType] = my_generator\r\n```\r\n\r\nBut it doesn't work. Do you have any idea about what to do to make it work?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/klen/mixer/issues/comments/370229892","html_url":"https://github.com/klen/mixer/issues/73#issuecomment-370229892","issue_url":"https://api.github.com/repos/klen/mixer/issues/73","id":370229892,"user":{"login":"ei-grad","id":78607,"avatar_url":"https://avatars0.githubusercontent.com/u/78607?v=4","gravatar_id":"","url":"https://api.github.com/users/ei-grad","html_url":"https://github.com/ei-grad","followers_url":"https://api.github.com/users/ei-grad/followers","following_url":"https://api.github.com/users/ei-grad/following{/other_user}","gists_url":"https://api.github.com/users/ei-grad/gists{/gist_id}","starred_url":"https://api.github.com/users/ei-grad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ei-grad/subscriptions","organizations_url":"https://api.github.com/users/ei-grad/orgs","repos_url":"https://api.github.com/users/ei-grad/repos","events_url":"https://api.github.com/users/ei-grad/events{/privacy}","received_events_url":"https://api.github.com/users/ei-grad/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T13:36:44Z","updated_at":"2018-03-04T13:36:44Z","author_association":"NONE","body":"I came to the following solution to use PostgreSQL UUIDs:\r\n\r\n```python\r\nfrom sqlalchemy.dialects import postgresql as pg\r\nfrom mixer.backend.sqlalchemy import Mixer, GenFactory\r\nfrom mixer import mix_types\r\n\r\nclass MyFactory(GenFactory):\r\n    types = dict(GenFactory.types)\r\n    types[pg.UUID] = mix_types.UUID\r\n\r\n\r\nmixer = Mixer(factory=MyFactory)\r\n```"}}
{"actor":{"display_login":"ei-grad"}}