I'm new to ObjectBox. I have a worklistDocumentNumber, from which I need to get report master data by using query. Can anyone help me with this. I tried by adding some filter conditions in query, but I'm not sure how exactly this works...
@Entity()
class ReportMaster {
int id;
String? reportName;
String? reportContent;
final workList = ToOne<WorkList>();
ReportMaster({
this.id = 0,
required this.reportName,
required this.reportContent,
});
}
@Entity()
class WorkList{
int id;
String? worklistDocumentNumber;
String? worklistStatus;
WorkList({
this.id = 0 ,
this.worklistDocumentNumber,
this.worklistStatus,
});
}
This is my Store
late final Store _store;
late final Box<ReportMaster> _reportMasterBox;
ObjectBox._init(this._store){
_reportMasterBox = Box<ReportMaster>(_store);
}
static Future<ObjectBox> init() async {
final store = await openStore();
return ObjectBox._init(store);
}