{"action":"created","issue":{"url":"https://api.github.com/repos/go-pg/pg/issues/756","repository_url":"https://api.github.com/repos/go-pg/pg","labels_url":"https://api.github.com/repos/go-pg/pg/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/go-pg/pg/issues/756/comments","events_url":"https://api.github.com/repos/go-pg/pg/issues/756/events","html_url":"https://github.com/go-pg/pg/issues/756","id":294032784,"number":756,"title":"HasMany not fetching HasOne data inside of the HasMany","user":{"login":"Fyb3roptik","id":339131,"avatar_url":"https://avatars0.githubusercontent.com/u/339131?v=4","gravatar_id":"","url":"https://api.github.com/users/Fyb3roptik","html_url":"https://github.com/Fyb3roptik","followers_url":"https://api.github.com/users/Fyb3roptik/followers","following_url":"https://api.github.com/users/Fyb3roptik/following{/other_user}","gists_url":"https://api.github.com/users/Fyb3roptik/gists{/gist_id}","starred_url":"https://api.github.com/users/Fyb3roptik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fyb3roptik/subscriptions","organizations_url":"https://api.github.com/users/Fyb3roptik/orgs","repos_url":"https://api.github.com/users/Fyb3roptik/repos","events_url":"https://api.github.com/users/Fyb3roptik/events{/privacy}","received_events_url":"https://api.github.com/users/Fyb3roptik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-02T21:44:46Z","updated_at":"2018-04-18T10:16:59Z","closed_at":"2018-02-15T07:48:23Z","author_association":"NONE","body":"```golang\r\ntype Contest struct {\r\n\tBaseModel\r\n\tName                   string    `sql:\"name\" json:\"name\"`\r\n\tStartDate              time.Time `sql:\"start_date\" json:\"start_date\"`\r\n\tEndDate                time.Time `sql:\"end_date\" json:\"end_date\"`\r\n        TierSettings\t      []*TierSetting\t\t`sql:\"-\" json:\"tier_settings\"`\r\n}\r\n\r\ntype Tier struct {\r\n  BaseModel\r\n  Name            string        `sql:\"name\" json:\"name\"`\r\n}\r\n\r\ntype TierSetting struct {\r\n  BaseModel\r\n  ContestId             int64         `sql:\"contest_id\" json:\"contest_id\"`\r\n  Rules                 string        `sql:\"rules\" json:\"rules\"`\r\n  TierId                int64         `sql:\"tier_id\" json:\"tier_id\" pg:\",fk:Tier\"`\r\n  Tier                  *Tier          `sql:\"-\" json:\"tier,omitempty\"`\r\n  Parameters             string    `sql:\"parameters\" json:\"parameters\"`\r\n}\r\n\r\ncontest := &Contest{}\r\ncontest, _ = contest.Read(contest.Id)\r\n```\r\n\r\nIn this example, if I do a Read on Contest, it does fetch TierSettings with the HAsMany relationship, but inside of TierSetting, Tier is null. It is not also fetching the HasOne data inside of the HasMany. How can I resolve this without having to run loops?"},"comment":{"url":"https://api.github.com/repos/go-pg/pg/issues/comments/382338397","html_url":"https://github.com/go-pg/pg/issues/756#issuecomment-382338397","issue_url":"https://api.github.com/repos/go-pg/pg/issues/756","id":382338397,"user":{"login":"macnibblet","id":1127626,"avatar_url":"https://avatars3.githubusercontent.com/u/1127626?v=4","gravatar_id":"","url":"https://api.github.com/users/macnibblet","html_url":"https://github.com/macnibblet","followers_url":"https://api.github.com/users/macnibblet/followers","following_url":"https://api.github.com/users/macnibblet/following{/other_user}","gists_url":"https://api.github.com/users/macnibblet/gists{/gist_id}","starred_url":"https://api.github.com/users/macnibblet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macnibblet/subscriptions","organizations_url":"https://api.github.com/users/macnibblet/orgs","repos_url":"https://api.github.com/users/macnibblet/repos","events_url":"https://api.github.com/users/macnibblet/events{/privacy}","received_events_url":"https://api.github.com/users/macnibblet/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T10:16:59Z","updated_at":"2018-04-18T10:16:59Z","author_association":"NONE","body":"Uhm, I second that question still having this problem with the latest master"}}
{"actor":{"display_login":"macnibblet"}}