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

Commit 58a0314a by Erik van de Ven

write test "should be possible to select on columns inside a through table"

1 parent 96d54225
Showing with 26 additions and 0 deletions
......@@ -1750,6 +1750,32 @@ describe(Support.getTestDialectTeaser('Include'), function() {
});
});
it('should be possible to select on columns inside a through table', function(done) {
var self = this;
this.fixtureA(function() {
self.models.Product.findAll({
attributes: ['title'],
include: [
{
model: self.models.Tag,
through: {
where: {
ProductId: 3
}
},
required: true
}
]
}).done(function(err, products) {
expect(err).not.to.be.ok;
expect(products).have.length(1);
done();
});
});
});
// Test case by @eshell
it('should be possible not to include the main id in the attributes', function(done) {
var Member = this.sequelize.define('Member', {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!