diff --git a/adonis-typings/model.ts b/adonis-typings/model.ts index 860ec477..07fb9147 100644 --- a/adonis-typings/model.ts +++ b/adonis-typings/model.ts @@ -519,6 +519,7 @@ declare module '@ioc:Adonis/Lucid/Model' { save(): Promise delete(): Promise refresh(): Promise + load: LucidRowPreload preload: LucidRowPreload /** diff --git a/npm-audit.html b/npm-audit.html index 1f6a48f6..1b4245ad 100644 --- a/npm-audit.html +++ b/npm-audit.html @@ -55,7 +55,7 @@
- November 30th 2020, 10:48:01 am + November 30th 2020, 10:49:40 am

Last updated

diff --git a/src/Orm/BaseModel/index.ts b/src/Orm/BaseModel/index.ts index 9b7f4d44..155b3ce1 100644 --- a/src/Orm/BaseModel/index.ts +++ b/src/Orm/BaseModel/index.ts @@ -1610,6 +1610,13 @@ export class BaseModel implements LucidRow { return this } + /** + * A more expressive alias for "this.preload" + */ + public async load(relationName: any, callback?: any) { + return this.preload(relationName, callback) + } + /** * Preloads one or more relationships for the current model */