from a bit search, I came to know you need to have collections created before using transactions

so I have created collection before using transaction like below, even the we got the same error.

if (!haveModel) {
await mongoose.connection.db.createCollection(“test_collection”);
}

const result = await TestModel.create([flow], { session });

any help would be appreciated.