getting document which are referenced to in other document
I'm used to SQL and I'm having trouble solving a problem. I'll to try to explain using the following example.
In the following "has many" construction, books are listed in a category:
It would probably be better to use a "belongs to" model, but this is better to answer my question.
How would I get all books from the category "fantasy" ordered by likes descending? What would the view look like?