These are chat archives for Automattic/mongoose

11th
May 2016
pixelul
@pixelul
May 11 2016 07:25
sup guys
anyone here? got a question
i would like to make a module and inject the view and controller of that module inside other modules
to be more specific a dropdown and the selected item is stored inside the user model
this part is done but would like to make a module out of it and just use the module in other modules
what would be the best approach to do this ?
pixelul
@pixelul
May 11 2016 09:07
done it via directive
berkutx
@berkutx
May 11 2016 13:29
@Jstillerman no, populate() does not work for me. I use lean() after query(find) and manualy collect items from other colleclion.
Sebastien Vaucouleur
@vaucouleur
May 11 2016 14:02
Hi, I'm looking for what the Mongoose community would consider as the best workaround to implement a query that "behave like" an inner-join. I know that I can always loop on the results of a query (that includes a populate), and hence get back an inner-join semantic. But is there any "cleaner" option ? Any consensus on this ? Thanks !
Sebastien Vaucouleur
@vaucouleur
May 11 2016 14:14
hmm.. correcting myself: inner join is not exactly the right analogy. Basically, I want to filter-out documents for which a populate did not work out. And ideally, I'd like to do this using the best/recommended way (which might not be just "looping through the result array").