{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-dotnet/issues/959","repository_url":"https://api.github.com/repos/realm/realm-dotnet","labels_url":"https://api.github.com/repos/realm/realm-dotnet/issues/959/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/issues/959/comments","events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/959/events","html_url":"https://github.com/realm/realm-dotnet/issues/959","id":192694418,"number":959,"title":"Error on inheritance?","user":{"login":"stephenhauck","id":12648793,"avatar_url":"https://avatars.githubusercontent.com/u/12648793?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenhauck","html_url":"https://github.com/stephenhauck","followers_url":"https://api.github.com/users/stephenhauck/followers","following_url":"https://api.github.com/users/stephenhauck/following{/other_user}","gists_url":"https://api.github.com/users/stephenhauck/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenhauck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenhauck/subscriptions","organizations_url":"https://api.github.com/users/stephenhauck/orgs","repos_url":"https://api.github.com/users/stephenhauck/repos","events_url":"https://api.github.com/users/stephenhauck/events{/privacy}","received_events_url":"https://api.github.com/users/stephenhauck/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-30T22:10:36Z","updated_at":"2016-12-01T02:05:37Z","closed_at":"2016-12-01T02:05:37Z","body":"I am building a system with Xamarin and another object database and wanted to switch to Realm but I have an issue ......\r\n\r\nI am getting this error :Severity\tCode\tDescription\tProject\tFile\tLine\tSuppression State\r\nError\t\tFody/RealmWeaver: The type CommScV2.Models.Metadata.Route indirectly inherits from RealmObject which is not supported.\tCommScV2\t\t\t\r\n\r\n\r\nI have a model like such:\r\n\r\n public class MetadataBase : RealmObject\r\n    {\r\n    }\r\n\r\nThen I have a model like such:\r\n  public class Route : MetadataBase\r\n    {\r\n}\r\n\r\nNot seeing the problem here ......\r\n\r\nI have TONS of classes like this due to integration with an existing WCF web service.\r\n\r\nThanks for any help you can offer.....\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments/264057442","html_url":"https://github.com/realm/realm-dotnet/issues/959#issuecomment-264057442","issue_url":"https://api.github.com/repos/realm/realm-dotnet/issues/959","id":264057442,"user":{"login":"AndyDentFree","id":1586093,"avatar_url":"https://avatars.githubusercontent.com/u/1586093?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyDentFree","html_url":"https://github.com/AndyDentFree","followers_url":"https://api.github.com/users/AndyDentFree/followers","following_url":"https://api.github.com/users/AndyDentFree/following{/other_user}","gists_url":"https://api.github.com/users/AndyDentFree/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyDentFree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyDentFree/subscriptions","organizations_url":"https://api.github.com/users/AndyDentFree/orgs","repos_url":"https://api.github.com/users/AndyDentFree/repos","events_url":"https://api.github.com/users/AndyDentFree/events{/privacy}","received_events_url":"https://api.github.com/users/AndyDentFree/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T02:05:37Z","updated_at":"2016-12-01T02:05:37Z","body":"Hi @stephenhauck \r\nThe problem is, as described in the Fody error, _ indirectly inherits from RealmObject which is not supported_\r\n\r\nWe currently required you to inherit directly from `RealmObject` without an intermediate class such as your `MetadataBase`.\r\n\r\nWe do understand that is a pain for some people. The main reason is we do not yet support composing inherited objects in the core Realm.\r\n\r\nI am closing your issue as a duplicate of the original #529 and if you would like to add more detail about your expectations there they would be very much appreciated.\r\n\r\nOne possibility for the .NET SDK is that, if your intermediate classes do not add any persistent properties, but just behaviour, we could relax the constraint. However, there would still be issues if you wanted to write a query on the common base class - you can only query the _leaf_ classes as they are the ones in the Realm store."}}
{"actor":{"display_login":"AndyDentFree"}}