Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize include only

Payment.findAll({
    where: {
        DairyId: req.query.dairyid
    },
    attributes: {
        exclude: ['createdAt', 'updatedAt']
    },
    include: {
        model: Customer,
        attributes:['customerName', 'phoneNumber']
    }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sequelize #include
ADD COMMENT
Topic
Name
9+1 =