1

Hi I am using Room DB and inserting a primary key and two embedded fields in a table. While trying to get the data from that table. That embedded fields returning null.

Table be like:

@NonNull
    @PrimaryKey
    @ColumnInfo(name = "ID", defaultValue = "0")
    private int ID;

    @Embedded
    private ArrayList<Attachments> Attachments;
    @Embedded
    private ArrayList<Fields> Fields;

and the query used to get data in DAO

 @Query("SELECT * FROM Data")
    List<Data>  getAll();

And call from Activity :

data= DatabaseClient.getInstance(getApplicationContext()).getAppDatabase().data().getALL();

Please help me on this!

Malhotra
  • 221
  • 3
  • 13

0 Answers0