@Entity(tableName = "invoiceDetail",
primaryKeys = { "p_id", "inv_id" },
foreignKeys = {
@ForeignKey(entity = Product.class,
parentColumns = "p_id",
childColumns = "p_id"),
@ForeignKey(entity = Invoice.class,
parentColumns = "inv_id",
childColumns = "inv_id")
})
public class CardWithCategoryEntity {
@Embedded
public CardEntity cardEntity;
@Ignore
@Relation(parentColumn = "id", entityColumn = "cards_id", entity = CardCategoryEntity.class, projection = {"cards_id, category_id, record_type"})
public List<CategoryEntity> categoryList;
}