{"action":"created","issue":{"url":"https://api.github.com/repos/yesodweb/persistent/issues/569","repository_url":"https://api.github.com/repos/yesodweb/persistent","labels_url":"https://api.github.com/repos/yesodweb/persistent/issues/569/labels{/name}","comments_url":"https://api.github.com/repos/yesodweb/persistent/issues/569/comments","events_url":"https://api.github.com/repos/yesodweb/persistent/issues/569/events","html_url":"https://github.com/yesodweb/persistent/issues/569","id":158143910,"number":569,"title":"unhandled error for composite/non id primary keys","user":{"login":"jwaldmann","id":1334345,"avatar_url":"https://avatars.githubusercontent.com/u/1334345?v=3","gravatar_id":"","url":"https://api.github.com/users/jwaldmann","html_url":"https://github.com/jwaldmann","followers_url":"https://api.github.com/users/jwaldmann/followers","following_url":"https://api.github.com/users/jwaldmann/following{/other_user}","gists_url":"https://api.github.com/users/jwaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaldmann/subscriptions","organizations_url":"https://api.github.com/users/jwaldmann/orgs","repos_url":"https://api.github.com/users/jwaldmann/repos","events_url":"https://api.github.com/users/jwaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/jwaldmann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-02T13:43:12Z","updated_at":"2016-06-02T20:49:52Z","closed_at":"2016-06-02T20:49:52Z","body":"I am getting this error \r\n```\r\nunhandled error for composite/non id primary keys pfilter=In persistList=[] pdef=CompositeDef {compositeFields = [FieldDef {fieldHaskell = HaskellName {unHaskellName = \"studentId\"}, fieldDB = DBName {unDBName = \"SNr\"}, fieldType = FTTypeCon Nothing \"StudentId\", fieldSqlType = SqlOther \"SqlType unset for studentId\", fieldAttrs = [\"sql=SNr\"], fieldStrict = True, fieldReference = NoReference},FieldDef {fieldHaskell = HaskellName {unHaskellName = \"gruppeId\"}, fieldDB = DBName {unDBName = \"GNr\"}, fieldType = FTTypeCon Nothing \"GruppeId\", fieldSqlType = SqlOther \"SqlType unset for gruppeId\", fieldAttrs = [\"sql=GNr\"], fieldStrict = True, fieldReference = NoReference}], compositeAttrs = []}\r\n```\r\nand I have no idea how to debug this. The error message does not even mention the table's name (but I can guess it from the names of columns - in this case)\r\n\r\nmodel/table looks like\r\n```\r\nEinschreibung sql=stud_grp\r\n  studentId         StudentId            sql=SNr\r\n  gruppeId          GruppeId             sql=GNr\r\n  Primary studentId gruppeId\r\n\r\nmysql> describe stud_grp;\r\n+-------+------------+------+-----+---------+-------+\r\n| Field | Type       | Null | Key | Default | Extra |\r\n+-------+------------+------+-----+---------+-------+\r\n| SNr   | bigint(20) | NO   | PRI | NULL    |       |\r\n| GNr   | bigint(20) | NO   | PRI | NULL    |       |\r\n+-------+------------+------+-----+---------+-------+\r\n```\r\nand I confirmed that there are no duplicate rows.\r\n"},"comment":{"url":"https://api.github.com/repos/yesodweb/persistent/issues/comments/223417941","html_url":"https://github.com/yesodweb/persistent/issues/569#issuecomment-223417941","issue_url":"https://api.github.com/repos/yesodweb/persistent/issues/569","id":223417941,"user":{"login":"gregwebs","id":1183,"avatar_url":"https://avatars.githubusercontent.com/u/1183?v=3","gravatar_id":"","url":"https://api.github.com/users/gregwebs","html_url":"https://github.com/gregwebs","followers_url":"https://api.github.com/users/gregwebs/followers","following_url":"https://api.github.com/users/gregwebs/following{/other_user}","gists_url":"https://api.github.com/users/gregwebs/gists{/gist_id}","starred_url":"https://api.github.com/users/gregwebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregwebs/subscriptions","organizations_url":"https://api.github.com/users/gregwebs/orgs","repos_url":"https://api.github.com/users/gregwebs/repos","events_url":"https://api.github.com/users/gregwebs/events{/privacy}","received_events_url":"https://api.github.com/users/gregwebs/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T20:49:52Z","updated_at":"2016-06-02T20:49:52Z","body":"I would suggest producing a NonEmpty (I would like to change the API to require that) any time you do an In query. Just call toList on the NonEmpty. A better error message is committed to master now."}}
{"actor":{"display_login":"gregwebs"}}