Lucid hasOne relation foreign key is undefined #1774
Unanswered
farshadfahimi
asked this question in
Help
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a model like below with the simple relation
the question is in the
adonisjs
Model in thebelongTo
method I'm logging the foreignkey like belowbut the first params I mean
foreignKey
returnundefined
but therelatedModel.foreignKey
returnuser_id
.and as you can see I'm passing the
foreignKey
to the relation.Beta Was this translation helpful? Give feedback.
All reactions