Replies: 5 comments 5 replies
-
I'm also facing the same problem. |
Beta Was this translation helpful? Give feedback.
-
What happens when you call
|
Beta Was this translation helpful? Give feedback.
-
I am also facing the same problem. I have tried many approaches but unfortunately without success. |
Beta Was this translation helpful? Give feedback.
-
After some investigation, it seems like the decorator isn't registering the relationship correctly. The first argument of the decorator which should return the related model, returns Maybe it should be converted into an issue in the @adonisjs/lucid repository? I can provide a repo to demonstrate the issue, if needed. |
Beta Was this translation helpful? Give feedback.
-
Anyone found a fix? - it seems like the child models' boot method never gets called? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Many of my models share the same properties/relations. I'd want to extract these in a separate parent class
While columns such as
createdAt
work just fine, the relations throw an error, in this case thebelongsTo()
When I do something like
return User.query()
in my Controller, I get the following error.Am I doing something wrong, or is this not possible?
Beta Was this translation helpful? Give feedback.
All reactions