不要怂,就是干,撸起袖子干!

Updated example

1 parent 081b4b1e
Showing with 3 additions and 1 deletions
......@@ -50,7 +50,8 @@ sequelize.sync({ force: true })
console.log('=====================================');
console.log('Searching for any content in Japanese');
console.log('-------------------------------------');
return Content.find({ where: "metadata->>'language' = 'Japanese'" })
return Content.find({ where: Sequelize.json({ metadata: { language: 'Japanese' } }) })
.then(function(content) {
console.log('Result:', content.dataValues);
console.log('=====================================');
......@@ -60,6 +61,7 @@ sequelize.sync({ force: true })
console.log('=====================================');
console.log('Searching for any content in English');
console.log('-------------------------------------');
return Content.find({ where: "metadata->>'language' = 'English'" })
.then(function(content) {
console.log('Result:', content.dataValues);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!