{"action":"created","issue":{"url":"https://api.github.com/repos/typeorm/typeorm/issues/116","repository_url":"https://api.github.com/repos/typeorm/typeorm","labels_url":"https://api.github.com/repos/typeorm/typeorm/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/typeorm/typeorm/issues/116/comments","events_url":"https://api.github.com/repos/typeorm/typeorm/issues/116/events","html_url":"https://github.com/typeorm/typeorm/issues/116","id":194742062,"number":116,"title":"Single table inheritance","user":{"login":"TylerDev6","id":21083563,"avatar_url":"https://avatars.githubusercontent.com/u/21083563?v=3","gravatar_id":"","url":"https://api.github.com/users/TylerDev6","html_url":"https://github.com/TylerDev6","followers_url":"https://api.github.com/users/TylerDev6/followers","following_url":"https://api.github.com/users/TylerDev6/following{/other_user}","gists_url":"https://api.github.com/users/TylerDev6/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerDev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerDev6/subscriptions","organizations_url":"https://api.github.com/users/TylerDev6/orgs","repos_url":"https://api.github.com/users/TylerDev6/repos","events_url":"https://api.github.com/users/TylerDev6/events{/privacy}","received_events_url":"https://api.github.com/users/TylerDev6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-10T03:36:36Z","updated_at":"2016-12-10T03:39:33Z","closed_at":null,"body":"Hi @pleerock, I'm trying to implement single-table and getting the ER_DUP_KEY problem...\r\n\r\nI've stripped everything out and this is what I've got left:\r\n\r\n`@Table(\"game_event\")\r\n@TableInheritance(\"single-table\")\r\n@DiscriminatorColumn({ name: \"type\", type: \"string\" })\r\nexport class GameEventEntity extends EntityTable {\r\n\t@Column(\"simple_array\")\r\n\tpublic onIce: PlayerEntity[];\r\n\t@ManyToOne(type => GameEntity, gameEntity => gameEntity.events)\r\n\tpublic game: GameEntity;\r\n}`\r\n\r\nthen my child table class is like so....\r\n\r\n`@SingleTableChild()\r\n@DiscriminatorValue(\"player\")\r\nexport class PlayerEventEntity extends GameEventEntity {\r\n\t@OneToOne(type => PlayerEntity)\r\n\t@JoinColumn()\r\n\tpublic player: PlayerEntity;\r\n}`"},"comment":{"url":"https://api.github.com/repos/typeorm/typeorm/issues/comments/266176347","html_url":"https://github.com/typeorm/typeorm/issues/116#issuecomment-266176347","issue_url":"https://api.github.com/repos/typeorm/typeorm/issues/116","id":266176347,"user":{"login":"TylerDev6","id":21083563,"avatar_url":"https://avatars.githubusercontent.com/u/21083563?v=3","gravatar_id":"","url":"https://api.github.com/users/TylerDev6","html_url":"https://github.com/TylerDev6","followers_url":"https://api.github.com/users/TylerDev6/followers","following_url":"https://api.github.com/users/TylerDev6/following{/other_user}","gists_url":"https://api.github.com/users/TylerDev6/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerDev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerDev6/subscriptions","organizations_url":"https://api.github.com/users/TylerDev6/orgs","repos_url":"https://api.github.com/users/TylerDev6/repos","events_url":"https://api.github.com/users/TylerDev6/events{/privacy}","received_events_url":"https://api.github.com/users/TylerDev6/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T03:39:33Z","updated_at":"2016-12-10T03:39:33Z","body":"ER_DUP_KEY: Can't write; duplicate key in table '#sql-2c1e_458'\r\n"}}
{"actor":{"display_login":"TylerDev6"}}