{"action":"created","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/1874","repository_url":"https://api.github.com/repos/npgsql/npgsql","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/1874/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/1874/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/1874/events","html_url":"https://github.com/npgsql/npgsql/issues/1874","id":309930387,"number":1874,"title":"F# records cannot be mapped as composite types","user":{"login":"kspeakman","id":4582668,"avatar_url":"https://avatars2.githubusercontent.com/u/4582668?v=4","gravatar_id":"","url":"https://api.github.com/users/kspeakman","html_url":"https://github.com/kspeakman","followers_url":"https://api.github.com/users/kspeakman/followers","following_url":"https://api.github.com/users/kspeakman/following{/other_user}","gists_url":"https://api.github.com/users/kspeakman/gists{/gist_id}","starred_url":"https://api.github.com/users/kspeakman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kspeakman/subscriptions","organizations_url":"https://api.github.com/users/kspeakman/orgs","repos_url":"https://api.github.com/users/kspeakman/repos","events_url":"https://api.github.com/users/kspeakman/events{/privacy}","received_events_url":"https://api.github.com/users/kspeakman/received_events","type":"User","site_admin":false},"labels":[{"id":70004675,"url":"https://api.github.com/repos/npgsql/npgsql/labels/enhancement","name":"enhancement","color":"009800","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/npgsql/npgsql/milestones/47","html_url":"https://github.com/npgsql/npgsql/milestone/47","labels_url":"https://api.github.com/repos/npgsql/npgsql/milestones/47/labels","id":2614051,"number":47,"title":"4.1","description":"","creator":{"login":"roji","id":1862641,"avatar_url":"https://avatars0.githubusercontent.com/u/1862641?v=4","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":0,"state":"open","created_at":"2017-06-30T07:35:32Z","updated_at":"2018-05-17T14:53:07Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-03-29T23:03:54Z","updated_at":"2018-05-21T23:53:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"MapComposite has a default constructor restriction. F# records have no default constructors. They are generated with a full constructor with all properties. I am only using composite types as **query input**, so (I think) I could use records with no problem if this restriction was lifted.\r\n\r\nI understand that this restriction is so you can construct and set properties when users `SELECT` composite types. If you did want to take my suggestion and lift the restriction, I see a few possibilities:\r\n\r\n* Look for constructors which match the composite type properties. (Dapper / Newtonsoft do this.)\r\n* Force readonly properties to be set thru reflection anyway. Precedent exists with structs already.\r\n* Do nothing else. See if anyone notices. After all, the user is specifically registering the type to be a data object to represent the composite.\r\n\r\nFor now I made extra types just for MapComposite and copy the data over to them. But it would be great to be able to map F# records to composite types.\r\n\r\nThanks for Npgsql. It is awesome!"},"comment":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/comments/390819697","html_url":"https://github.com/npgsql/npgsql/issues/1874#issuecomment-390819697","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/1874","id":390819697,"user":{"login":"kspeakman","id":4582668,"avatar_url":"https://avatars2.githubusercontent.com/u/4582668?v=4","gravatar_id":"","url":"https://api.github.com/users/kspeakman","html_url":"https://github.com/kspeakman","followers_url":"https://api.github.com/users/kspeakman/followers","following_url":"https://api.github.com/users/kspeakman/following{/other_user}","gists_url":"https://api.github.com/users/kspeakman/gists{/gist_id}","starred_url":"https://api.github.com/users/kspeakman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kspeakman/subscriptions","organizations_url":"https://api.github.com/users/kspeakman/orgs","repos_url":"https://api.github.com/users/kspeakman/repos","events_url":"https://api.github.com/users/kspeakman/events{/privacy}","received_events_url":"https://api.github.com/users/kspeakman/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T23:53:00Z","updated_at":"2018-05-21T23:53:00Z","author_association":"CONTRIBUTOR","body":"It may not be passed only though F#."}}
{"actor":{"display_login":"kspeakman"}}