relationships do
belongs_to :parent, __MODULE__
has_many :children, __MODULE__, destination_attribute: :parent_id
end
postgres do
polymorphic? true
repo Butsby.Repo
references do
reference :parent, on_delete: :delete
end
end
relationships do
belongs_to :parent, __MODULE__
has_many :children, __MODULE__, destination_attribute: :parent_id
end
postgres do
polymorphic? true
repo Butsby.Repo
references do
reference :parent, on_delete: :delete
end
end