Embedding a struct in a has-one relationship #3746
Unanswered
bjubes
asked this question in
Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my schema i have a Job that always has a foreign key to a video. I'd like the Job struct to have an embedded video every time i am using it. I can achieve this on a select doing the following:
output struct:
but I can't seem to get it to work when inserting a job. I've tried
which won't compile.
gives:
What is the correct SQL for this to work on insert (and hopefully update as well)
Beta Was this translation helpful? Give feedback.
All reactions