{"action":"created","issue":{"url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/286","repository_url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL","labels_url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/286/comments","events_url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/286/events","html_url":"https://github.com/oysteinkrog/SQLite.Net-PCL/issues/286","id":146184920,"number":286,"title":"Compound key table can't be updated","user":{"login":"Tsayper","id":18292189,"avatar_url":"https://avatars.githubusercontent.com/u/18292189?v=3","gravatar_id":"","url":"https://api.github.com/users/Tsayper","html_url":"https://github.com/Tsayper","followers_url":"https://api.github.com/users/Tsayper/followers","following_url":"https://api.github.com/users/Tsayper/following{/other_user}","gists_url":"https://api.github.com/users/Tsayper/gists{/gist_id}","starred_url":"https://api.github.com/users/Tsayper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tsayper/subscriptions","organizations_url":"https://api.github.com/users/Tsayper/orgs","repos_url":"https://api.github.com/users/Tsayper/repos","events_url":"https://api.github.com/users/Tsayper/events{/privacy}","received_events_url":"https://api.github.com/users/Tsayper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T04:40:14Z","updated_at":"2016-04-06T17:36:30Z","closed_at":"2016-04-06T17:35:02Z","body":"Here's my table:\r\n\r\n[Table(\"Rels\")]\r\npublic class Rel\r\n{\r\n    [PrimaryKey]\r\n    public int Sup { get; set; }\r\n    [PrimaryKey]\r\n    public int Sub { get; set; }\r\n    public int Val { get; set; }\r\n}\r\n\r\nWhen i try to update it, exception is thrown. The only information given in the exception is a word \"Constraint\".\r\n\r\nRel r = new Rel() { Sup = 0, Sub = 2, Val = 2 };\r\ndb.Update(r);   //this does not work.. \"Constraint\" exception\r\n\r\nAnother table, having a single field PK, updates ok. What am i doing wrong? Please help. Thanks!\r\n\r\nPS: it works if i use SQLitePlatformGeneric, but doesn't work for SQLitePlatformWinRT (UWP application). So the probleim is in WinRT platform code it seems.."},"comment":{"url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/comments/206481606","html_url":"https://github.com/oysteinkrog/SQLite.Net-PCL/issues/286#issuecomment-206481606","issue_url":"https://api.github.com/repos/oysteinkrog/SQLite.Net-PCL/issues/286","id":206481606,"user":{"login":"Tsayper","id":18292189,"avatar_url":"https://avatars.githubusercontent.com/u/18292189?v=3","gravatar_id":"","url":"https://api.github.com/users/Tsayper","html_url":"https://github.com/Tsayper","followers_url":"https://api.github.com/users/Tsayper/followers","following_url":"https://api.github.com/users/Tsayper/following{/other_user}","gists_url":"https://api.github.com/users/Tsayper/gists{/gist_id}","starred_url":"https://api.github.com/users/Tsayper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tsayper/subscriptions","organizations_url":"https://api.github.com/users/Tsayper/orgs","repos_url":"https://api.github.com/users/Tsayper/repos","events_url":"https://api.github.com/users/Tsayper/events{/privacy}","received_events_url":"https://api.github.com/users/Tsayper/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T17:36:30Z","updated_at":"2016-04-06T17:36:30Z","body":"the error has gone for some reason.. maybe because i've recreated the table with WITHOUT ROWID option.. i'll try to recreate the issue..."}}