Relationship boilerplate #4030
Unanswered
stereobooster
asked this question in
Help
Replies: 2 comments
-
Hello, can you explain a little more your issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Can you show us your migration? But basically, if you name columns appropriately, it will know what and how to link and all you'd have to do is: @hasOne(() => Node)
public to: HasOne<typeof Node> |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I'm new to Adonis and maybe doesn't understand something. For every
hasOne
relationship I have to declare keys. Can't Adonis figure out column based on relationship itself?So I would not need to specify
public to_node_id: number
?Beta Was this translation helpful? Give feedback.
All reactions