Your Question

gorm version v1.25.2

We are experiencing an invalid transaction error since version v1.25.2. When we created a DB Session with the replica setting, we applied the Write Clause and called the Begin function. This code worked fine until v1.25.1, but since v1.25.2, it is generating an invalid transaction error.

The error occurs when the type validation of dbResolver's connPool implementation in the Begin function fails for the ConnPoolBeginner interface.

The document you expected this should be explained

If we use Begin transaction for db Resolver, shouldn't we use Write Clause? I would like to know the correct usage example. Or is there something we need to set up for version upgrades?

Expected answer

Please provide an appropriate example