diff --git a/src/orm/relations/belongs_to/index.ts b/src/orm/relations/belongs_to/index.ts index 3bf70bf3..9505154a 100644 --- a/src/orm/relations/belongs_to/index.ts +++ b/src/orm/relations/belongs_to/index.ts @@ -59,6 +59,8 @@ export class BelongsTo implements BelongsToRelationContract LucidModel, @@ -68,6 +70,7 @@ export class BelongsTo implements BelongsToRelationContract */ onQueryHook + declare meta?: any + constructor( public relationName: string, public relatedModel: () => LucidModel, @@ -70,6 +72,7 @@ export class HasMany implements HasManyRelationContract this.serializeAs = this.options.serializeAs === undefined ? this.relationName : this.options.serializeAs this.onQueryHook = this.options.onQuery + this.meta = this.options.meta } /** diff --git a/src/orm/relations/has_many_through/index.ts b/src/orm/relations/has_many_through/index.ts index d71510c7..67a9cdd8 100644 --- a/src/orm/relations/has_many_through/index.ts +++ b/src/orm/relations/has_many_through/index.ts @@ -59,6 +59,8 @@ export class HasManyThrough implements HasManyThroughRelationContract LucidModel, @@ -75,6 +77,7 @@ export class HasManyThrough implements HasManyThroughRelationContract { */ onQueryHook + declare meta?: any + constructor( public relationName: string, public relatedModel: () => LucidModel, @@ -57,6 +59,7 @@ export class HasOne implements HasOneRelationContract { this.onQueryHook = this.options.onQuery this.serializeAs = this.options.serializeAs === undefined ? this.relationName : this.options.serializeAs + this.meta = this.options.meta } /** diff --git a/src/orm/relations/many_to_many/index.ts b/src/orm/relations/many_to_many/index.ts index d1481f12..5a42939f 100644 --- a/src/orm/relations/many_to_many/index.ts +++ b/src/orm/relations/many_to_many/index.ts @@ -62,6 +62,8 @@ export class ManyToMany implements ManyToManyRelationContract LucidModel + meta?: any } /**