Skip to content
Discussion options

You must be logged in to vote

In the generated code, you will see the relationship key in a comment in the modelR struct. For example:

// videoR is where relationships are stored.
type videoR struct {
	Tags    TagSlice // video_tags.video_tags_tag_id_fkeyvideo_tags.video_tags_video_id_fkey
	Sponsor *Sponsor // videos.videos_sponsor_id_fkey
	User    *User    // videos.videos_user_id_fkey
}

Use that in the configuration:

aliases:
  team:
    relationships: 
      "video_tags.video_tags_tag_id_fkeyvideo_tags.video_tags_video_id_fkey": "Owner"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stephenafamo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants