是否可以递归插入数据?我有一个这样的实体:
@Entity(tableName = "category")
public class CategoryEntity {
@PrimaryKey
@ColumnInfo(name = "category_id")
private Long categoryId;
@NonNull
@ColumnInfo(name = "category_title")
private String categoryTitle= "";
@NonNull
@ColumnInfo(name = "children")
private List<CategoryEntity> subcategories;
}
我要插入具有某些子类别的数据库类别,并且该子类别可能还具有子列表等,等等。有人知道如何使用RxJava2递归吗?