I felt a issue today. Does Lucid return null on hasone/belongsto relationship when no related data found??
user =await User.find(id) profile = await user.profile().fetch()
i was sending that to view
Kept throwing toJSON() on null. Had to push condition on that.
But shouldn’t it return a underlying whatever (object/collection) lucid provide rather than null even if no profile found for user ???