I want to preload a model even if it have a null foreign key. I'll use the models from Adonis docs page to ilustrate: User and Profile.
const user = await User.query().preload("profile")
Simple as that!
But in my case, if a user have the key profile_id as null, it throws an exception, what means it only preload existing relationships (fair enough).
To make clear, I not want to preload just users with existing foreign keys, I need both existing user related models and users with no models to preload.
I have read and tested the examples from docs page, but it haven't enough explanation about this case (or I just didn't found it).
Any hints will be appreciated