0
this.route('SousCategorie', {
    path: '/cat/:_id',
    data: function () {
        var categorie = Categories.find({_id:this.params._id});
        templateData = { categories: Scategories.find({categorieID:categorie._id}, {scategorie:1}) };
        return templateData;
    }
});

I tried to translate this sql query using meteor but I can’t do:

here are my two entities:

  • Category (category_id, category_name, #id_scategorie)
  • Scategorie (id_scategorie, nom_scategorie)

sql query:

select sc.nom_scategorie, c.nom_categorie from category c, sc scategorie
        Where c.id_categorie = sc.id_categorie
        and c.nom_categorie = "citizenship" 

for example I do not know how to retrieve the subcategories within a class and I want to get it exactly as presented in my SQL query.

elsa
  • 43
  • 4
  • Might be a duplicate of [this](http://stackoverflow.com/questions/4563205/how-to-join-query-in-mongodb). – CodeChimp Aug 16 '16 at 13:07
  • Possible duplicate of [MongoDB: How to resolve DBRef on client-side?](http://stackoverflow.com/questions/37793844/mongodb-how-to-resolve-dbref-on-client-side) – Paul Sweatte Aug 16 '16 at 14:46

0 Answers0