I read this question Many to Many relationship in Firebase,
and here describes how to create or structure many to many relationship within firebase(nosql database),
and it is pretty easy,
companyContractors
companyKey1
contractorKey1: true
contractorKey3: true
companyKey2
contractorKey2: true
contractorCompanies
contractorKey1
companyKey1: true,
companyKey2: true
contractorKey2
companyKey2: true
contractorKey3
companyKey1: true
but when i want to get all contractors specific company, can i do it using only one request? because in this case i get only list of id, and after there, using js loop, or forEach, i do multiple request.
usually on others API's, i only use
URL/contractor/:id/company or
URL/company/:id/contractors
how to do it on firebase?
it would be cool to have an example of using angular2, angularfire2
thanks