Your Question

I have a component using native sql transaction(*sql.DB.BeginTx). Is it possible to integrate with gorm's Transaction? That is to say, can my component and gorm work in the same transaction?

Expected answer

  1. A method to get interanl native *sql.Tx instance in gorm transaction
  2. A solution to integrate native tx with gorm tx