Update to make Author has many AuthorRoles.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user