Cannot read property 'serialize' of null #2650
-
I am making a user controller in a CRUD, where each user will have a profile. Checking in the documentation, when I do a BelongsTo or HasOne type relationship, the return should be, in my case, profile or null, but this error is returning:
This is my controller:
This is my migration:
and this is my Model:
Am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @brunodsazevedo! 👋 Which version of AdonisJS Lucid are you using? |
Beta Was this translation helpful? Give feedback.
-
My problem is not due to version. Is there any other solution. it happened after using hasOne |
Beta Was this translation helpful? Give feedback.
Hey @brunodsazevedo! 👋
Which version of AdonisJS Lucid are you using?
The latest one is
14.0.2
.