{"action":"opened","issue":{"url":"https://api.github.com/repos/devmynd/jsonb_accessor/issues/40","repository_url":"https://api.github.com/repos/devmynd/jsonb_accessor","labels_url":"https://api.github.com/repos/devmynd/jsonb_accessor/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/devmynd/jsonb_accessor/issues/40/comments","events_url":"https://api.github.com/repos/devmynd/jsonb_accessor/issues/40/events","html_url":"https://github.com/devmynd/jsonb_accessor/issues/40","id":137247803,"number":40,"title":"Using joins for queries raises PostgreSQL error","user":{"login":"boriscy","id":38298,"avatar_url":"https://avatars.githubusercontent.com/u/38298?v=3","gravatar_id":"","url":"https://api.github.com/users/boriscy","html_url":"https://github.com/boriscy","followers_url":"https://api.github.com/users/boriscy/followers","following_url":"https://api.github.com/users/boriscy/following{/other_user}","gists_url":"https://api.github.com/users/boriscy/gists{/gist_id}","starred_url":"https://api.github.com/users/boriscy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boriscy/subscriptions","organizations_url":"https://api.github.com/users/boriscy/orgs","repos_url":"https://api.github.com/users/boriscy/repos","events_url":"https://api.github.com/users/boriscy/events{/privacy}","received_events_url":"https://api.github.com/users/boriscy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-29T13:01:46Z","updated_at":"2016-02-29T13:01:46Z","closed_at":null,"body":"When using joins for a query it uses the jsonb attributes as part of the query, for example try this\r\n```ruby\r\nProduct.includes(:product_category).joins(:product_category).first\r\n```\r\nand you will get a PostgreSQL error.\r\nI have some complicated queries that needed to use **joins** to eager load but have tried with newer version of ActiveRecord and it doesn't need any more.\r\n"}}