I have read the object box documentation for many-to-many relationship https://docs.objectbox.io/relations
And also this solution for many-to-many relationship in noSQL firebase Many to Many relationship in Firebase
What could be the issue if I go with second approach for all 1:N and M:N relations for my offline database using Dart objectbox library?
Adding some code for 1:N relationship
class Customer {
int? id;
}
class Orders {
int? id;
int? customerId;
}
So here every order will always have an extra customer id. Whenever we would require to find the orders for a customer, that will happen via querying the orders for customer id.