{"action":"opened","issue":{"url":"https://api.github.com/repos/nviennot/nobrainer/issues/173","labels_url":"https://api.github.com/repos/nviennot/nobrainer/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/nviennot/nobrainer/issues/173/comments","events_url":"https://api.github.com/repos/nviennot/nobrainer/issues/173/events","html_url":"https://github.com/nviennot/nobrainer/issues/173","id":113503236,"number":173,"title":"Join with optional belongs_to","user":{"login":"ajselvig","id":455594,"avatar_url":"https://avatars.githubusercontent.com/u/455594?v=3","gravatar_id":"","url":"https://api.github.com/users/ajselvig","html_url":"https://github.com/ajselvig","followers_url":"https://api.github.com/users/ajselvig/followers","following_url":"https://api.github.com/users/ajselvig/following{/other_user}","gists_url":"https://api.github.com/users/ajselvig/gists{/gist_id}","starred_url":"https://api.github.com/users/ajselvig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajselvig/subscriptions","organizations_url":"https://api.github.com/users/ajselvig/orgs","repos_url":"https://api.github.com/users/ajselvig/repos","events_url":"https://api.github.com/users/ajselvig/events{/privacy}","received_events_url":"https://api.github.com/users/ajselvig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-27T04:10:04Z","updated_at":"2015-10-27T04:10:04Z","closed_at":null,"body":"The documentation says that .join() performs an inner join, but I'm getting an error whenever I try to join on an association that is optional (i.e. there are records that don't have the association id):\r\n\r\n```ruby\r\nclass Foo\r\n  include NoBrainer::Document\r\nend\r\n\r\nclass Bar\r\n  include NoBrainer::Document\r\n  belongs_to :foo\r\nend\r\n\r\nBar.create!\r\nBar.join('foo').entries\r\n```\r\n\r\nprints:\r\n\r\n```\r\nNo attribute `foo_id` in object: (RethinkDB::RqlRuntimeError) ...\r\n```\r\n\r\nIs there any way around this?"}}