go-gorm / playground

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

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

Open alkuma opened 6 months ago

alkuma commented 6 months 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 5 months 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 4 months ago

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