{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/864","labels_url":"https://api.github.com/repos/realm/realm-java/issues/864/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/864/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/864/events","html_url":"https://github.com/realm/realm-java/issues/864","id":57988377,"number":864,"title":"copyToRealmOrUpdate() Throws PrimaryKey Constraint Exception When PrimaryKey Is Field In Non-PrimaryKey Class","user":{"login":"thorbenprimke","id":741767,"avatar_url":"https://avatars.githubusercontent.com/u/741767?v=3","gravatar_id":"","url":"https://api.github.com/users/thorbenprimke","html_url":"https://github.com/thorbenprimke","followers_url":"https://api.github.com/users/thorbenprimke/followers","following_url":"https://api.github.com/users/thorbenprimke/following{/other_user}","gists_url":"https://api.github.com/users/thorbenprimke/gists{/gist_id}","starred_url":"https://api.github.com/users/thorbenprimke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thorbenprimke/subscriptions","organizations_url":"https://api.github.com/users/thorbenprimke/orgs","repos_url":"https://api.github.com/users/thorbenprimke/repos","events_url":"https://api.github.com/users/thorbenprimke/events{/privacy}","received_events_url":"https://api.github.com/users/thorbenprimke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-17T21:53:50Z","updated_at":"2015-02-17T22:43:16Z","closed_at":null,"body":"copyToRealmOrUpdate() doesn't seem to pass the update flag through for objects that don't have a primaryKey and thus any fields within that object is only attempted to be copied. \r\n\r\nExample: https://github.com/thorbenprimke/realm-java/tree/nestedObjectCausesPrimaryKeyConflict\r\nExample code: https://github.com/thorbenprimke/realm-java/blob/9f2992ef20e9b3241bac9a6e45f7fe034167c70f/examples/introExample/src/main/java/io/realm/examples/intro/IntroExampleActivity.java#L106\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/74771284","html_url":"https://github.com/realm/realm-java/issues/864#issuecomment-74771284","issue_url":"https://api.github.com/repos/realm/realm-java/issues/864","id":74771284,"user":{"login":"thorbenprimke","id":741767,"avatar_url":"https://avatars.githubusercontent.com/u/741767?v=3","gravatar_id":"","url":"https://api.github.com/users/thorbenprimke","html_url":"https://github.com/thorbenprimke","followers_url":"https://api.github.com/users/thorbenprimke/followers","following_url":"https://api.github.com/users/thorbenprimke/following{/other_user}","gists_url":"https://api.github.com/users/thorbenprimke/gists{/gist_id}","starred_url":"https://api.github.com/users/thorbenprimke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thorbenprimke/subscriptions","organizations_url":"https://api.github.com/users/thorbenprimke/orgs","repos_url":"https://api.github.com/users/thorbenprimke/repos","events_url":"https://api.github.com/users/thorbenprimke/events{/privacy}","received_events_url":"https://api.github.com/users/thorbenprimke/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T22:43:16Z","updated_at":"2015-02-17T22:43:16Z","body":"Forgot the stacktrace: https://gist.github.com/thorbenprimke/bc59000b0a336f7b1351"}}