{"action":"created","issue":{"url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/1","labels_url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/1/comments","events_url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/1/events","html_url":"https://github.com/waterlink/postgres_adapter.cr/issues/1","id":114752552,"number":1,"title":"Error when trying to use primary macro","user":{"login":"sdogruyol","id":990485,"avatar_url":"https://avatars.githubusercontent.com/u/990485?v=3","gravatar_id":"","url":"https://api.github.com/users/sdogruyol","html_url":"https://github.com/sdogruyol","followers_url":"https://api.github.com/users/sdogruyol/followers","following_url":"https://api.github.com/users/sdogruyol/following{/other_user}","gists_url":"https://api.github.com/users/sdogruyol/gists{/gist_id}","starred_url":"https://api.github.com/users/sdogruyol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdogruyol/subscriptions","organizations_url":"https://api.github.com/users/sdogruyol/orgs","repos_url":"https://api.github.com/users/sdogruyol/repos","events_url":"https://api.github.com/users/sdogruyol/events{/privacy}","received_events_url":"https://api.github.com/users/sdogruyol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-03T06:39:20Z","updated_at":"2015-11-03T19:35:06Z","closed_at":null,"body":"When i try to assign primary key like below\r\n\r\n```crystal\r\nrequire \"active_record\"\r\nrequire \"postgres_adapter\"\r\n\r\nENV[\"PG_URL\"] = \"postgres://serdardogruyol@localhost:5432/kiosk\"\r\n\r\nclass User < ActiveRecord::Model\r\n  adapter postgres\r\n\r\n  primary(id :: Int32)\r\n\r\nend\r\n\r\n```\r\n\r\nI get a macro expand error like this\r\n\r\n```\r\nError in macro 'primary' /Users/serdardogruyol/serdar/pg-sample/libs/active_record/model.cr:86, line 2:\r\n\r\n  1.       @@primary_field = \"id\"\r\n  2.       field id :: Int32\r\n  3.       _field primary_key, id :: Int32\r\n  4.\r\n\r\n      field id :: Int32\r\n      ^~~~~\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/comments/153463949","html_url":"https://github.com/waterlink/postgres_adapter.cr/issues/1#issuecomment-153463949","issue_url":"https://api.github.com/repos/waterlink/postgres_adapter.cr/issues/1","id":153463949,"user":{"login":"sdogruyol","id":990485,"avatar_url":"https://avatars.githubusercontent.com/u/990485?v=3","gravatar_id":"","url":"https://api.github.com/users/sdogruyol","html_url":"https://github.com/sdogruyol","followers_url":"https://api.github.com/users/sdogruyol/followers","following_url":"https://api.github.com/users/sdogruyol/following{/other_user}","gists_url":"https://api.github.com/users/sdogruyol/gists{/gist_id}","starred_url":"https://api.github.com/users/sdogruyol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdogruyol/subscriptions","organizations_url":"https://api.github.com/users/sdogruyol/orgs","repos_url":"https://api.github.com/users/sdogruyol/repos","events_url":"https://api.github.com/users/sdogruyol/events{/privacy}","received_events_url":"https://api.github.com/users/sdogruyol/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T19:35:06Z","updated_at":"2015-11-03T19:35:06Z","body":"@waterlink i figured it out. If you dont specify the name of the model this happens"}}