{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/2330","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2330/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2330/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2330/events","html_url":"https://github.com/realm/realm-cocoa/issues/2330","id":98607630,"number":2330,"title":"Swift: realm.objectForPrimaryKey(Object, key: id) expects Object.self","user":{"login":"schickling","id":1567498,"avatar_url":"https://avatars.githubusercontent.com/u/1567498?v=3","gravatar_id":"","url":"https://api.github.com/users/schickling","html_url":"https://github.com/schickling","followers_url":"https://api.github.com/users/schickling/followers","following_url":"https://api.github.com/users/schickling/following{/other_user}","gists_url":"https://api.github.com/users/schickling/gists{/gist_id}","starred_url":"https://api.github.com/users/schickling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schickling/subscriptions","organizations_url":"https://api.github.com/users/schickling/orgs","repos_url":"https://api.github.com/users/schickling/repos","events_url":"https://api.github.com/users/schickling/events{/privacy}","received_events_url":"https://api.github.com/users/schickling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-02T12:53:37Z","updated_at":"2015-08-02T12:53:37Z","closed_at":null,"body":"The `realm.objects` API allows the form `realm.objects(Object)` while the `realm.objectForPrimaryKey(Object.self, key: id)` API expects the `Object` param to be `Object.self`. Is this an intended behavior?\r\n\r\nImo just writing `realm.objectForPrimaryKey(Object, key: id)` would be the more Swift-way to do :+1: \r\n\r\nThe same applies to the `realm.create(Object, value: ..., update: ...)` API."}}