These are chat archives for Automattic/mongoose

May 2016
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 ?
May 11 2016 09:07
done it via directive
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
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
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").