Select using field with belongs_to association
Description
My structs are:
type Issue struct { ID uuid.UUID json:"id" db:"id" CreatedAt time.Time json:"created_at" db:"created_at" UpdatedAt time.Time json:"updated_at" db:"updated_at" Project Project json:"project" db:"-" belongs_to:"project" ProjectID uuid.UUID json:"project_id" db:"project_id" ... }
type Project struct { ID uuid.UUID json:"id" db:"id" CreatedAt time.Time json:"created_at" db:"created_at" UpdatedAt time.Time json:"updated_at" db:"updated_at" Language slices.String json:"language" db:"language" ... }
The problem is that I can't use a statement like this: Select * from issues where project.language = 'java' I'm already using Eager which loads associations. Is there any way to search using this associations?
Behavior
ERROR: missing FROM-clause entry for table "projects" at character 261
Info
Docker - Buffalo