fix has_one with inheritance