I have a VideoList object which I want to save using room library but when i try to use @Embedded with public List list = null; it is giving me below error: Error:(23, 24) error: Cannot figure out how to save this field into database. You can consider adding a type converter for it.
VideoList Class is as below.
@Entity
public class VideoList {
@PrimaryKey
public String id;
public String title;
public String viewType;
public Integer sortingOrder = null;
public String componentSlug;
public String endPoint = null;
@Embedded
public List<Video> list = null;
public boolean hidden = false; }
Any suggestions?
@Embedded
only works with primitives, things that would go into individual columns in the table forVideoList
. AFAIK, you would need to have aVideo
entity with its own table and a foreign key back to the list. – Moneychanger