From b40c305af1a7783c6d27495ea4fe2aca2941242d Mon Sep 17 00:00:00 2001 From: Thelonius Kort Date: Wed, 11 Jan 2023 19:11:07 +0100 Subject: [PATCH] Add deleting article with associated translations --- lib/outlook/articles/article.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outlook/articles/article.ex b/lib/outlook/articles/article.ex index 2dfc7ce..7e6b94e 100644 --- a/lib/outlook/articles/article.ex +++ b/lib/outlook/articles/article.ex @@ -13,7 +13,7 @@ defmodule Outlook.Articles.Article do field :title, :string field :url, :string belongs_to :author, Author - has_many :translations, Translation + has_many :translations, Translation, on_delete: :delete_all timestamps() end