debiprasad's avatar

debiprasad liked a comment+100 XP

5mos ago

why laravel add an extra where condition "foreign key is not null" to hasOne/Many relation?

Old post, but as I had the case, I did some digging I finally went to the source directly, and discovered the reason here

hasMany extends HasOneOrMany, and this check is required in the HasOne case.