These are chat archives for jinzhu/gorm

29th
Sep 2015
Nino van der Linden
@ninov
Sep 29 2015 15:55

If I have two models like

type Thing struct {
     gorm.Model
     User User
     UserId int
     // ...
}

and

type User struct {
    gorm.Model
    // ...
}

How can I query a list of Things with their User joined? If I just use tx.Find(&things) their User value is empty.

And what does Failed to generate name for field. Make sure the field name is valid. mean in the logs?