go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

Question about mongo transaction

Open JhouXerox opened this issue 3 years ago • 0 comments

model(dao) level allows to input context, but not expose any mongo client.

when use mongo-driver,i usually call: client.UseSession(...)

to create transaction context.but dao is generated by goctl.

how do i create session in service level? Is there any suggestion

JhouXerox avatar Aug 29 '22 05:08 JhouXerox