Opps, if hasOne and there is not child id then it should be zero not one.