Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fc901b3ec | |||
| 50e0cf3090 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@extollo/lib",
|
"name": "@extollo/lib",
|
||||||
"version": "0.5.11",
|
"version": "0.5.12",
|
||||||
"description": "The framework library that lifts up your code.",
|
"description": "The framework library that lifts up your code.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -194,7 +194,15 @@ export abstract class Model<T extends Model<T>> extends AppClass implements Bus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( this.prototype.scopes ) {
|
||||||
|
// Same thing here. Try to get the scopes statically, if possible
|
||||||
builder.withScopes(this.prototype.scopes)
|
builder.withScopes(this.prototype.scopes)
|
||||||
|
} else if ( this.constructor.length < 1 ) {
|
||||||
|
// Otherwise, try to instantiate the model if possible and load the scopes that way
|
||||||
|
const inst = Container.getContainer().make<Model<any>>(this)
|
||||||
|
builder.withScopes(inst.scopes)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return builder
|
return builder
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user