Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

left join in sequelize

Shop.findAll({
     where:{id:shopId}, 
     include:[
         { model:ShopAd, as:'ads', 
           where:{ 
                 is_valid:1, 
                 is_vertify:1},   
           required:false
           }
         ]
      })
      .success(function(result) {
        callback(result);
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #left #join #sequelize
ADD COMMENT
Topic
Name
7+5 =