{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/2562","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2562/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2562/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2562/events","html_url":"https://github.com/realm/realm-cocoa/issues/2562","id":107938971,"number":2562,"title":"Primary key handling by derived classes","user":{"login":"peterpaulis","id":1956972,"avatar_url":"https://avatars.githubusercontent.com/u/1956972?v=3","gravatar_id":"","url":"https://api.github.com/users/peterpaulis","html_url":"https://github.com/peterpaulis","followers_url":"https://api.github.com/users/peterpaulis/followers","following_url":"https://api.github.com/users/peterpaulis/following{/other_user}","gists_url":"https://api.github.com/users/peterpaulis/gists{/gist_id}","starred_url":"https://api.github.com/users/peterpaulis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterpaulis/subscriptions","organizations_url":"https://api.github.com/users/peterpaulis/orgs","repos_url":"https://api.github.com/users/peterpaulis/repos","events_url":"https://api.github.com/users/peterpaulis/events{/privacy}","received_events_url":"https://api.github.com/users/peterpaulis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/Help","name":"Help","color":"cc317c"},{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/pending","name":"pending","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"TimOliver","id":429119,"avatar_url":"https://avatars.githubusercontent.com/u/429119?v=3","gravatar_id":"","url":"https://api.github.com/users/TimOliver","html_url":"https://github.com/TimOliver","followers_url":"https://api.github.com/users/TimOliver/followers","following_url":"https://api.github.com/users/TimOliver/following{/other_user}","gists_url":"https://api.github.com/users/TimOliver/gists{/gist_id}","starred_url":"https://api.github.com/users/TimOliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimOliver/subscriptions","organizations_url":"https://api.github.com/users/TimOliver/orgs","repos_url":"https://api.github.com/users/TimOliver/repos","events_url":"https://api.github.com/users/TimOliver/events{/privacy}","received_events_url":"https://api.github.com/users/TimOliver/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-09-23T14:57:15Z","updated_at":"2015-09-26T09:14:13Z","closed_at":null,"body":"I have a base class\r\n\"A\" with primary key \"aID\"\r\n\r\nthen i have 2 derived classes from A\r\n\r\nB : A\r\nC : A\r\n\r\nin C i return primaryKey nil -> so class C doesn't have a primary key and i don't want it to have one (but it still inherits the \"aID\", which is used) \r\n\r\nWhen i try to save a C object, which has an existing \"aID\" i get \r\n\r\n*** Terminating app due to uncaught exception 'RLMException', reason: 'Can't set primary key property 'contributorID' to existing value '442'.'\r\n*** First throw call stack:\r\n\r\n**But class C doesn't have a primary Key** (it's base class has a primary key, but not the derived class)"},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/143414278","html_url":"https://github.com/realm/realm-cocoa/issues/2562#issuecomment-143414278","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2562","id":143414278,"user":{"login":"peterpaulis","id":1956972,"avatar_url":"https://avatars.githubusercontent.com/u/1956972?v=3","gravatar_id":"","url":"https://api.github.com/users/peterpaulis","html_url":"https://github.com/peterpaulis","followers_url":"https://api.github.com/users/peterpaulis/followers","following_url":"https://api.github.com/users/peterpaulis/following{/other_user}","gists_url":"https://api.github.com/users/peterpaulis/gists{/gist_id}","starred_url":"https://api.github.com/users/peterpaulis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterpaulis/subscriptions","organizations_url":"https://api.github.com/users/peterpaulis/orgs","repos_url":"https://api.github.com/users/peterpaulis/repos","events_url":"https://api.github.com/users/peterpaulis/events{/privacy}","received_events_url":"https://api.github.com/users/peterpaulis/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T09:14:13Z","updated_at":"2015-09-26T09:14:13Z","body":"Hi\r\n\r\nI want to do a sample code\r\n\r\nThe only way i could go around this was by moving aid to c"}}