{"action":"created","issue":{"url":"https://api.github.com/repos/intermine/intermine/issues/897","labels_url":"https://api.github.com/repos/intermine/intermine/issues/897/labels{/name}","comments_url":"https://api.github.com/repos/intermine/intermine/issues/897/comments","events_url":"https://api.github.com/repos/intermine/intermine/issues/897/events","html_url":"https://github.com/intermine/intermine/issues/897","id":52670209,"number":897,"title":"reverse-reference system cannot capture some relationships","user":{"login":"alexkalderimis","id":436846,"avatar_url":"https://avatars.githubusercontent.com/u/436846?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkalderimis","html_url":"https://github.com/alexkalderimis","followers_url":"https://api.github.com/users/alexkalderimis/followers","following_url":"https://api.github.com/users/alexkalderimis/following{/other_user}","gists_url":"https://api.github.com/users/alexkalderimis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkalderimis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkalderimis/subscriptions","organizations_url":"https://api.github.com/users/alexkalderimis/orgs","repos_url":"https://api.github.com/users/alexkalderimis/repos","events_url":"https://api.github.com/users/alexkalderimis/events{/privacy}","received_events_url":"https://api.github.com/users/alexkalderimis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-22T17:27:06Z","updated_at":"2015-01-05T11:33:47Z","closed_at":null,"body":"In the testmodel there are Employees that have departments that have employees - so `Employee::department` is the reverse reference of `Department::employees`, naturally enough. However there are also Managers (a subtype of Employee) who also have departments which have managers, but `Manager::department` is not a reverse reference of `Department::manager`, even though they are in fact reverse-references.\r\n\r\nThe natural inclination is to add this fact to the model as follows:\r\n\r\n```xml\r\n<reference name=\"manager\" referenced-type=\"Manager\" reverse-reference=\"department\"/>\r\n```\r\n\r\nHowever doing so causes the build to fail because the reverse reference cannot be found on the Manager class, and in any case reverse references must point to each other. This case makes it quite clear that it is easy to think of natural instances where more than one reverse-reference relationship can exist, and where they both make sense.\r\n\r\nThis is _far_ from urgent, but it would be interesting to know why this kind of relationship is illegal, and whether it would be possible to these kinds of well-formed models.\r\n"},"comment":{"url":"https://api.github.com/repos/intermine/intermine/issues/comments/68697053","html_url":"https://github.com/intermine/intermine/issues/897#issuecomment-68697053","issue_url":"https://api.github.com/repos/intermine/intermine/issues/897","id":68697053,"user":{"login":"alexkalderimis","id":436846,"avatar_url":"https://avatars.githubusercontent.com/u/436846?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkalderimis","html_url":"https://github.com/alexkalderimis","followers_url":"https://api.github.com/users/alexkalderimis/followers","following_url":"https://api.github.com/users/alexkalderimis/following{/other_user}","gists_url":"https://api.github.com/users/alexkalderimis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkalderimis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkalderimis/subscriptions","organizations_url":"https://api.github.com/users/alexkalderimis/orgs","repos_url":"https://api.github.com/users/alexkalderimis/repos","events_url":"https://api.github.com/users/alexkalderimis/events{/privacy}","received_events_url":"https://api.github.com/users/alexkalderimis/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T11:33:47Z","updated_at":"2015-01-05T11:33:47Z","body":"The problem is that the scenario is logical, but the system forbids\nit."}}