go-gorm / playground

GORM Playground (Please Create PR for this project to report issues)
MIT License
87 stars 662 forks source link

Model() is not replacing the old value within a transaction #740

Open alkuma opened 1 month ago

alkuma commented 1 month ago

GORM Playground Link

https://github.com/go-gorm/playground/pull/739

Description

Attempt to insert into two different tables within a transaction one by one.

Expected : Successful commit should lead to a record each in both the tables.

Actual : the transaction errors with the error described in the PR description

alkuma commented 1 month ago

The tests for this https://github.com/go-gorm/playground/pull/739 are impacted by the same issue that's reported in https://github.com/go-gorm/playground/issues/730

xuyang2 commented 3 hours ago

https://github.com/go-gorm/playground/pull/739#issuecomment-2220620354