{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/761","labels_url":"https://api.github.com/repos/realm/realm-java/issues/761/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/761/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/761/events","html_url":"https://github.com/realm/realm-java/issues/761","id":54733746,"number":761,"title":"Inheritance / Polymorphism","user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Feature","name":"Feature","color":"c7def8"},{"url":"https://api.github.com/repos/realm/realm-java/labels/P2","name":"P2","color":"dedede"},{"url":"https://api.github.com/repos/realm/realm-java/labels/Waiting-Core","name":"Waiting-Core","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-01-19T07:26:24Z","updated_at":"2015-09-25T07:37:49Z","closed_at":null,"body":"A highly request feature is polymorphism. Mostly for use in ListAdapters, but a lot of other scenarios exists.\r\n\r\nWe need support for the following:\r\n- Abstract RealmObject classes\r\n- Query support\r\n\r\nExample\r\n```\r\npublic abstract Animal extends RealmObject {\r\n  private String name;\r\n}\r\n\r\npublic class Dog extends Animal {\r\n  private boolean willPlayCatch;\r\n}\r\n\r\npublic class Spider extends Animal {\r\n  private boolean isScary;\r\n}\r\n\r\n// Following should be possible\r\nRealmResults<Animal> animals = realm.where(Animal.class).equalsTo(\"name\",\"Foo\").findAll();\r\nString name = animals.get(0).getName();\r\n\r\nRealmResults<Dog> dogs = realm.where(Dog.class).equalsTo(\"name\",\"Foo\").and().equalsTo(\"willPlayCatch\", true).findAll();\r\nString name = dogs.get(0).getName();\r\n```\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/143150023","html_url":"https://github.com/realm/realm-java/issues/761#issuecomment-143150023","issue_url":"https://api.github.com/repos/realm/realm-java/issues/761","id":143150023,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T07:37:49Z","updated_at":"2015-09-25T07:37:49Z","body":"Hi @StErMi We are currently focusing on finishing other features, and we cannot move forward with this until we made changes to the underlying storage engine as it must support querying across abstract types. At this time I am afraid I don't have any timeline."}}