{"action":"created","issue":{"url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/11","repository_url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator","labels_url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/11/comments","events_url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/11/events","html_url":"https://github.com/beyondcode/laravel-er-diagram-generator/issues/11","id":339534415,"node_id":"MDU6SXNzdWUzMzk1MzQ0MTU=","number":11,"title":"Relationships defined in parent class + ignore abstract classes","user":{"login":"vpratfr","id":2526465,"node_id":"MDQ6VXNlcjI1MjY0NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/2526465?v=4","gravatar_id":"","url":"https://api.github.com/users/vpratfr","html_url":"https://github.com/vpratfr","followers_url":"https://api.github.com/users/vpratfr/followers","following_url":"https://api.github.com/users/vpratfr/following{/other_user}","gists_url":"https://api.github.com/users/vpratfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vpratfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpratfr/subscriptions","organizations_url":"https://api.github.com/users/vpratfr/orgs","repos_url":"https://api.github.com/users/vpratfr/repos","events_url":"https://api.github.com/users/vpratfr/events{/privacy}","received_events_url":"https://api.github.com/users/vpratfr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-09T17:09:38Z","updated_at":"2018-07-19T17:12:59Z","closed_at":null,"author_association":"NONE","body":"Some of our models extend a common base class which defines a relationship for all of them. \r\n\r\nThese relationships are not taken into account in the graph.\r\n\r\nFor instance:\r\n\r\n```\r\nclass Participant extends Model {\r\n    public function details() : MorphOne \r\n}\r\n\r\nabstract class ParticipantDetails extends Model {\r\n    public function participant() : MorphOne \r\n}\r\n\r\nclass PlayerDetails extends ParticipantDetails {\r\n    // inherits the participant relationship\r\n}\r\n\r\nclass RefereeDetails extends ParticipantDetails {\r\n    // inherits the participant relationship\r\n}\r\n```\r\n\r\nI think that any abstract class could be safely ignored.\r\n\r\nAnd the inherited relationship should be pulled in each concrete class."},"comment":{"url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/comments/406349975","html_url":"https://github.com/beyondcode/laravel-er-diagram-generator/issues/11#issuecomment-406349975","issue_url":"https://api.github.com/repos/beyondcode/laravel-er-diagram-generator/issues/11","id":406349975,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjM0OTk3NQ==","user":{"login":"vpratfr","id":2526465,"node_id":"MDQ6VXNlcjI1MjY0NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/2526465?v=4","gravatar_id":"","url":"https://api.github.com/users/vpratfr","html_url":"https://github.com/vpratfr","followers_url":"https://api.github.com/users/vpratfr/followers","following_url":"https://api.github.com/users/vpratfr/following{/other_user}","gists_url":"https://api.github.com/users/vpratfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vpratfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpratfr/subscriptions","organizations_url":"https://api.github.com/users/vpratfr/orgs","repos_url":"https://api.github.com/users/vpratfr/repos","events_url":"https://api.github.com/users/vpratfr/events{/privacy}","received_events_url":"https://api.github.com/users/vpratfr/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T17:12:58Z","updated_at":"2018-07-19T17:12:58Z","author_association":"NONE","body":"Removing that is not enough though. Something else is preventing the methods to get classified as relationships.\r\n\r\nOn top of that method, I think you could safely exit when finding an abstract class.\r\n\r\nOr perhaps better, maybe you could represent the class inheritance on the diagram and keep the abstract class."}}
{"actor":{"display_login":"vpratfr"}}