diff --git a/src/Factory/Relations/ManyToMany.ts b/src/Factory/Relations/ManyToMany.ts index ac4f8279..ca7cf592 100644 --- a/src/Factory/Relations/ManyToMany.ts +++ b/src/Factory/Relations/ManyToMany.ts @@ -73,6 +73,7 @@ export class ManyToMany implements FactoryRelationContract { pivotAttributes[pivotRelatedKey] = pivotRelatedValue }) + console.log(pivotAttributes) await this.relation.client(parent, this.ctx.$trx!).attach(pivotAttributes) parent.$setRelated(this.relation.relationName, instances) } diff --git a/test/factory/many-to-many.spec.ts b/test/factory/many-to-many.spec.ts index 2ca5e49a..01081604 100644 --- a/test/factory/many-to-many.spec.ts +++ b/test/factory/many-to-many.spec.ts @@ -181,7 +181,7 @@ test.group('Factory | ManyToMany | make', (group) => { }) }) -test.group('Factory | HasMany | create', (group) => { +test.group('Factory | ManyToMany | create', (group) => { group.before(async () => { db = getDb() BaseModel = getBaseModel(ormAdapter(db))