diff --git a/lib/music_library/records/record.ex b/lib/music_library/records/record.ex index bc812f3e..96c2913b 100644 --- a/lib/music_library/records/record.ex +++ b/lib/music_library/records/record.ex @@ -22,11 +22,10 @@ defmodule MusicLibrary.Records.Record do field :release_ids, {:array, :string}, default: [] field :included_release_group_ids, {:array, :string}, default: [] - embeds_many :artists, Artist do + embeds_many :artists, Artist, primary_key: {:musicbrainz_id, :binary_id, autogenerate: false} do field :name, :string field :sort_name, :string field :disambiguation, :string - field :musicbrainz_id, Ecto.UUID end timestamps(type: :utc_datetime) diff --git a/test/music_library_web/live/collection_live/index_test.exs b/test/music_library_web/live/collection_live/index_test.exs index 45608a62..0eaa2d4b 100644 --- a/test/music_library_web/live/collection_live/index_test.exs +++ b/test/music_library_web/live/collection_live/index_test.exs @@ -343,7 +343,6 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do [marillion] = record.artists assert %MusicLibrary.Records.Record.Artist{ - id: _, name: "Marillion", sort_name: "Marillion", disambiguation: "British progressive rock band",