Given that a
=> #<ActiveRecord::AssociationRelation [#<Child id: 1, status_id: nil ...>]
=> #<ActiveRecord::AssociationRelation >
This post suggests that SQL treats NULL, the absence of something, as something that can't be equal to something that exists.
10 things in MySQL that won’t work as expected has an example which requires using "IS" for null check, something like below.
Parent.find(1).childs.where("status_id != ? or status_id is null", 1)