Update to make Author has many AuthorRoles.

This commit is contained in:
2025-03-13 17:28:09 +02:00
parent ecdd4089e5
commit 9ad3ca2ee1
5 changed files with 271 additions and 5 deletions
@@ -115,8 +115,6 @@ defmodule DecentralisedBookIndex.Metadata.Author do
attribute_writable? true
end
belongs_to :author_role, Metadata.AuthorRole do
attribute_writable? true
end
has_many :author_role, Metadata.AuthorRole
end
end
@@ -42,8 +42,8 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
allow_nil? true
end
has_one :author, Metadata.Author do
allow_nil? false
belongs_to :author, Metadata.Author do
allow_nil? true
end
end
end