``` ruby
has_one :namespace, dependent: :destroy, foreign_key: :owner_id, class_name: Namespace, -> { where(type: nil) }
```