How to 'one-to-many'
Posted: Mon May 27, 2013 7:22 pm
by Dupdroid
What is the best way to handle a one-to-many relationship. Do I store the _id's in an array and get the "many" dataset in a separate service call or is there a way to get everything in one go like using the "include" parameter in a request when wanting to include a Pointer reverence to another collection?
How to 'one-to-many'
Posted: Mon May 27, 2013 8:04 pm
by Maryna Brodina
Hello! If you store your data in two tables - there is no way to get information through one request to DB. You should send two requests or store data in one table.
How to 'one-to-many'
Posted: Mon May 27, 2013 8:26 pm
by Dupdroid
Thank you Marina, I guess I have to rethink my db structure then.