{"action":"created","issue":{"url":"https://api.github.com/repos/jmoiron/sqlx/issues/160","labels_url":"https://api.github.com/repos/jmoiron/sqlx/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/jmoiron/sqlx/issues/160/comments","events_url":"https://api.github.com/repos/jmoiron/sqlx/issues/160/events","html_url":"https://github.com/jmoiron/sqlx/issues/160","id":101596994,"number":160,"title":"Getting \"missing destination name\" error even when field exists in the target structure","user":{"login":"maximchick","id":1458296,"avatar_url":"https://avatars.githubusercontent.com/u/1458296?v=3","gravatar_id":"","url":"https://api.github.com/users/maximchick","html_url":"https://github.com/maximchick","followers_url":"https://api.github.com/users/maximchick/followers","following_url":"https://api.github.com/users/maximchick/following{/other_user}","gists_url":"https://api.github.com/users/maximchick/gists{/gist_id}","starred_url":"https://api.github.com/users/maximchick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximchick/subscriptions","organizations_url":"https://api.github.com/users/maximchick/orgs","repos_url":"https://api.github.com/users/maximchick/repos","events_url":"https://api.github.com/users/maximchick/events{/privacy}","received_events_url":"https://api.github.com/users/maximchick/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-18T08:06:06Z","updated_at":"2015-08-18T08:43:26Z","closed_at":"2015-08-18T08:43:26Z","body":"Hi, I have this structure in go:\r\n\r\n```\r\ntype Transaction struct {\r\n\tId            int64\r\n\tReaderId      int64\r\n\tAmount        int\r\n}\r\n```\r\n\r\nSQLite3 schema:\r\n```\r\nCREATE TABLE tr(Id INTEGER PRIMARY KEY AUTOINCREMENT, ReaderId INTEGER(8), Amount INTEGER);\r\n```\r\n\r\nWhen I'm trying to load this structure from DB\r\n```\r\nt := &Transaction{}\r\nerr = DB.Get(t, \"SELECT * FROM tr WHERE Id=$1\", id)\r\n```\r\n\r\nI always get an error: \"missing destination name Id\""},"comment":{"url":"https://api.github.com/repos/jmoiron/sqlx/issues/comments/132121616","html_url":"https://github.com/jmoiron/sqlx/issues/160#issuecomment-132121616","issue_url":"https://api.github.com/repos/jmoiron/sqlx/issues/160","id":132121616,"user":{"login":"maximchick","id":1458296,"avatar_url":"https://avatars.githubusercontent.com/u/1458296?v=3","gravatar_id":"","url":"https://api.github.com/users/maximchick","html_url":"https://github.com/maximchick","followers_url":"https://api.github.com/users/maximchick/followers","following_url":"https://api.github.com/users/maximchick/following{/other_user}","gists_url":"https://api.github.com/users/maximchick/gists{/gist_id}","starred_url":"https://api.github.com/users/maximchick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximchick/subscriptions","organizations_url":"https://api.github.com/users/maximchick/orgs","repos_url":"https://api.github.com/users/maximchick/repos","events_url":"https://api.github.com/users/maximchick/events{/privacy}","received_events_url":"https://api.github.com/users/maximchick/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T08:43:26Z","updated_at":"2015-08-18T08:43:26Z","body":"Just looked at the sqlx code and realized that I have to use different mapper bc column names in my table are equal to structure's fields names:\r\n\r\n```\r\nsqlx.NameMapper = func(s string) string { return s }\r\n```\r\nNot very elegant still but works."}}