{"action":"opened","issue":{"url":"https://api.github.com/repos/BestSolution-at/emap/issues/31","repository_url":"https://api.github.com/repos/BestSolution-at/emap","labels_url":"https://api.github.com/repos/BestSolution-at/emap/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/BestSolution-at/emap/issues/31/comments","events_url":"https://api.github.com/repos/BestSolution-at/emap/issues/31/events","html_url":"https://github.com/BestSolution-at/emap/issues/31","id":155504125,"number":31,"title":"Support for use of abstract types","user":{"login":"redrezo","id":429967,"avatar_url":"https://avatars.githubusercontent.com/u/429967?v=3","gravatar_id":"","url":"https://api.github.com/users/redrezo","html_url":"https://github.com/redrezo","followers_url":"https://api.github.com/users/redrezo/followers","following_url":"https://api.github.com/users/redrezo/following{/other_user}","gists_url":"https://api.github.com/users/redrezo/gists{/gist_id}","starred_url":"https://api.github.com/users/redrezo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redrezo/subscriptions","organizations_url":"https://api.github.com/users/redrezo/orgs","repos_url":"https://api.github.com/users/redrezo/repos","events_url":"https://api.github.com/users/redrezo/events{/privacy}","received_events_url":"https://api.github.com/users/redrezo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BestSolution-at/emap/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-18T13:41:13Z","updated_at":"2016-05-18T13:41:13Z","closed_at":null,"body":"Example Model:\r\n```\r\nRoot {\r\n contains Event[] events opposite root\r\n}\r\nEntry {\r\n refers Event event opposite entries\r\n}\r\nabstract Event {\r\n contains Entry[] entries opposite event\r\n refers Root root opposite events\r\n}\r\nAEvent extends Event\r\nBEvent extends Event\r\n```\r\nAEvent and BEvent emappings both extend the Event emapping\r\n\r\n`Root.events` should be filled with `AEvent`s and `BEvent`s\r\n`Entry.event` should be filled with the correct type (`AEvent` or `BEvent`, never `Event`)\r\n\r\nAt the moment in both cases emap tries to instantiate `Event` which causes an Exception because it is abstract.\r\n\r\nThis could be solved via a Discriminator column in Event, but in this case we could also find the concrete type of Event by left outer joining it with AEvent and BEvent and check if AEvent or BEvents primary key exists\r\n\r\n"}}