Changed the order of deletion and saving of items at the time of synchronization

This commit is contained in:
CappielloAntonio 2021-05-02 12:20:43 +02:00
parent 01785b7bed
commit 86fcc8b479
13 changed files with 138 additions and 51 deletions

View file

@ -5,16 +5,13 @@ import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity(tableName = "playlist_song_cross")
@Entity(tableName = "playlist_song_cross", primaryKeys = {"playlist_id","song_id"})
public class PlaylistSongCross {
@NonNull
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "id")
private int id;
@ColumnInfo(name = "playlist_id")
private String playlistId;
@NonNull
@ColumnInfo(name = "song_id")
private String songId;
@ -23,14 +20,6 @@ public class PlaylistSongCross {
this.songId = songId;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPlaylistId() {
return playlistId;
}