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

Commit 7b7b23d5 by Sushant

fix(model): use object as options.scope default

1 parent 857850e0
...@@ -869,7 +869,7 @@ class Model { ...@@ -869,7 +869,7 @@ class Model {
schema: null, schema: null,
schemaDelimiter: '', schemaDelimiter: '',
defaultScope: {}, defaultScope: {},
scopes: [], scopes: {},
indexes: [] indexes: []
}, options); }, options);
......
...@@ -45,7 +45,7 @@ describe(Support.getTestDialectTeaser('belongsToMany'), () => { ...@@ -45,7 +45,7 @@ describe(Support.getTestDialectTeaser('belongsToMany'), () => {
const AB = current.model('AB'); const AB = current.model('AB');
expect(AB.options.defaultScope).to.deep.equal({}); expect(AB.options.defaultScope).to.deep.equal({});
expect(AB.options.scopes).to.have.length(0); expect(AB.options.scopes).to.deep.equal({});
}); });
it('should not inherit validations from parent to join table', () => { it('should not inherit validations from parent to join table', () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!